Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extending the network protocol #497

Merged
merged 15 commits into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions docs/Packets/C1-11-ObjectHitExtended_by-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# C1 11 - ObjectHitExtended (by server)

## Is sent when

An object got hit in two cases: 1. When the own player is hit; 2. When the own player attacked some other object which got hit.

## Causes the following actions on the client side

The damage is shown at the object which received the hit.

## Structure

| Index | Length | Data Type | Value | Description |
|-------|--------|-----------|-------|-------------|
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
| 1 | 1 | Byte | 16 | Packet header - length of the packet |
| 2 | 1 | Byte | 0x11 | Packet header - packet type identifier |
| 3 << 0 | 4 bit | DamageKind | | Kind |
| 3 << 6 | 1 bit | Boolean | | IsDoubleDamage |
| 3 << 7 | 1 bit | Boolean | | IsTripleDamage |
| 4 | 2 | ShortLittleEndian | | ObjectId |
| 6 | 1 | Byte | | HealthStatus; Gets or sets the status of the remaining health in fractions of 1/250. |
| 7 | 1 | Byte | | ShieldStatus; Gets or sets the status of the remaining shield in fractions of 1/250. |
| 8 | 4 | IntegerLittleEndian | | HealthDamage |
| 12 | 4 | IntegerLittleEndian | | ShieldDamage |

### DamageKind Enum

Defines the kind of the damage.

| Value | Name | Description |
|-------|------|-------------|
| 0 | NormalRed | Red color, used by normal damage. |
| 1 | IgnoreDefenseCyan | Cyan color, usually used by ignore defense damage. |
| 2 | ExcellentLightGreen | Light green color, usually used by excellent damage. |
| 3 | CriticalBlue | Blue color, usually used by critical damage. |
| 4 | LightPink | Light pink color. |
| 5 | PoisonDarkGreen | Dark green color, usually used by poison damage. |
| 6 | ReflectedDarkPink | Dark pink color, usually used by reflected damage. |
| 7 | White | White color. |
25 changes: 25 additions & 0 deletions docs/Packets/C1-25-AppearanceChangedExtended_by-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# C1 25 - AppearanceChangedExtended (by server)

## Is sent when

The appearance of a player changed, all surrounding players are informed about it.

## Causes the following actions on the client side

The appearance of the player is updated.

## Structure

| Index | Length | Data Type | Value | Description |
|-------|--------|-----------|-------|-------------|
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
| 1 | 1 | Byte | 14 | Packet header - length of the packet |
| 2 | 1 | Byte | 0x25 | Packet header - packet type identifier |
| 4 | 2 | ShortLittleEndian | | ChangedPlayerId |
| 6 | 1 | Byte | | ItemSlot |
| 7 | 1 | Byte | | ItemGroup |
| 8 | 2 | ShortLittleEndian | | ItemNumber |
| 10 | 1 | Byte | | ItemLevel |
| 11 | 1 | Byte | | ExcellentFlags |
| 12 | 1 | Byte | | AncientDiscriminator |
| 13 | 1 | Boolean | | IsAncientSetComplete |
20 changes: 20 additions & 0 deletions docs/Packets/C1-26-FD-ItemConsumptionFailedExtended_by-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# C1 26 FD - ItemConsumptionFailedExtended (by server)

## Is sent when

When the consumption of an item failed.

## Causes the following actions on the client side

The game client gets a feedback about a failed consumption, and allows for do further consumption requests.

## Structure

| Index | Length | Data Type | Value | Description |
|-------|--------|-----------|-------|-------------|
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
| 1 | 1 | Byte | 12 | Packet header - length of the packet |
| 2 | 1 | Byte | 0x26 | Packet header - packet type identifier |
| 3 | 1 | Byte | 0xFD | Packet header - sub packet type identifier |
| 4 | 4 | IntegerLittleEndian | | Health |
| 8 | 4 | IntegerLittleEndian | | Shield |
20 changes: 20 additions & 0 deletions docs/Packets/C1-26-FE-MaximumHealthAndShieldExtended_by-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# C1 26 FE - MaximumHealthAndShieldExtended (by server)

## Is sent when

When the maximum health changed, e.g. by adding stat points or changed items.

## Causes the following actions on the client side

The health and shield bar is updated on the game client user interface.

## Structure

| Index | Length | Data Type | Value | Description |
|-------|--------|-----------|-------|-------------|
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
| 1 | 1 | Byte | 12 | Packet header - length of the packet |
| 2 | 1 | Byte | 0x26 | Packet header - packet type identifier |
| 3 | 1 | Byte | 0xFE | Packet header - sub packet type identifier |
| 4 | 4 | IntegerLittleEndian | | Health |
| 8 | 4 | IntegerLittleEndian | | Shield |
20 changes: 20 additions & 0 deletions docs/Packets/C1-26-FF-CurrentHealthAndShieldExtended_by-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# C1 26 FF - CurrentHealthAndShieldExtended (by server)

## Is sent when

Periodically, or if the current health or shield changed on the server side, e.g. by hits.

## Causes the following actions on the client side

The health and shield bar is updated on the game client user interface.

## Structure

| Index | Length | Data Type | Value | Description |
|-------|--------|-----------|-------|-------------|
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
| 1 | 1 | Byte | 12 | Packet header - length of the packet |
| 2 | 1 | Byte | 0x26 | Packet header - packet type identifier |
| 3 | 1 | Byte | 0xFF | Packet header - sub packet type identifier |
| 4 | 4 | IntegerLittleEndian | | Health |
| 8 | 4 | IntegerLittleEndian | | Shield |
20 changes: 20 additions & 0 deletions docs/Packets/C1-27-FE-MaximumManaAndAbilityExtended_by-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# C1 27 FE - MaximumManaAndAbilityExtended (by server)

## Is sent when

The maximum available mana or ability has changed, e.g. by adding stat points.

## Causes the following actions on the client side

The mana and ability bar is updated on the game client user interface.

## Structure

| Index | Length | Data Type | Value | Description |
|-------|--------|-----------|-------|-------------|
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
| 1 | 1 | Byte | 12 | Packet header - length of the packet |
| 2 | 1 | Byte | 0x27 | Packet header - packet type identifier |
| 3 | 1 | Byte | 0xFE | Packet header - sub packet type identifier |
| 4 | 4 | IntegerLittleEndian | | Mana |
| 8 | 4 | IntegerLittleEndian | | Ability |
20 changes: 20 additions & 0 deletions docs/Packets/C1-27-FF-CurrentManaAndAbilityExtended_by-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# C1 27 FF - CurrentManaAndAbilityExtended (by server)

## Is sent when

The currently available mana or ability has changed, e.g. by using a skill.

## Causes the following actions on the client side

The mana and ability bar is updated on the game client user interface.

## Structure

| Index | Length | Data Type | Value | Description |
|-------|--------|-----------|-------|-------------|
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
| 1 | 1 | Byte | 12 | Packet header - length of the packet |
| 2 | 1 | Byte | 0x27 | Packet header - packet type identifier |
| 3 | 1 | Byte | 0xFF | Packet header - sub packet type identifier |
| 4 | 4 | IntegerLittleEndian | | Mana |
| 8 | 4 | IntegerLittleEndian | | Ability |
39 changes: 39 additions & 0 deletions docs/Packets/C1-3F-06-PlayerShopBuyResultExtended_by-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# C1 3F 06 - PlayerShopBuyResultExtended (by server)

## Is sent when

After the player requested to buy an item of a shop of another player.

## Causes the following actions on the client side

The result is shown to the player. If successful, the item is added to the inventory.

## Structure

| Index | Length | Data Type | Value | Description |
|-------|--------|-----------|-------|-------------|
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
| 1 | 1 | Byte | | Packet header - length of the packet |
| 2 | 1 | Byte | 0x3F | Packet header - packet type identifier |
| 3 | 1 | Byte | 0x06 | Packet header - sub packet type identifier |
| 4 | 2 | ShortLittleEndian | | SellerId |
| 6 | 1 | ResultKind | | Result |
| 8 | 1 | Byte | | ItemSlot |
| 9 | | Binary | | ItemData |

### ResultKind Enum

The kind of result.

| Value | Name | Description |
|-------|------|-------------|
| 0 | Undefined | Undefined result. |
| 1 | Success | The item has been bought successfully. |
| 2 | NotAvailable | The seller is not available. |
| 3 | ShopNotOpened | The requested player has no open shop. |
| 4 | InTransaction | The requested player is already in a transaction with another player. |
| 5 | InvalidShopSlot | The requested item slot is invalid. |
| 6 | NameMismatchOrPriceMissing | The requested player with the specified id has a different name or price is missing. |
| 7 | LackOfMoney | The player has not enough money to buy the item from the seller. |
| 8 | MoneyOverflowOrNotEnoughSpace | The selling player cannot sell the item, because the sale would overflow his money amount in the inventory. Another possibility is that the inventory of the buyer cannot take the item. |
| 9 | ItemBlock | The requested player has item block active. |
39 changes: 39 additions & 0 deletions docs/Packets/C1-3F-06-PlayerShopBuyResult_by-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# C1 3F 06 - PlayerShopBuyResult (by server)

## Is sent when

After the player requested to buy an item of a shop of another player.

## Causes the following actions on the client side

The result is shown to the player. If successful, the item is added to the inventory.

## Structure

| Index | Length | Data Type | Value | Description |
|-------|--------|-----------|-------|-------------|
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
| 1 | 1 | Byte | 21 | Packet header - length of the packet |
| 2 | 1 | Byte | 0x3F | Packet header - packet type identifier |
| 3 | 1 | Byte | 0x06 | Packet header - sub packet type identifier |
| 4 | 1 | ResultKind | | Result |
| 5 | 2 | ShortBigEndian | | SellerId |
| 8 | 13 | Binary | | ItemData |
| 20 | 1 | Byte | | ItemSlot |

### ResultKind Enum

The kind of result.

| Value | Name | Description |
|-------|------|-------------|
| 0 | Undefined | Undefined result. |
| 1 | Success | The item has been bought successfully. |
| 2 | NotAvailable | The seller is not available. |
| 3 | ShopNotOpened | The requested player has no open shop. |
| 4 | InTransaction | The requested player is already in a transaction with another player. |
| 5 | InvalidShopSlot | The requested item slot is invalid. |
| 6 | NameMismatchOrPriceMissing | The requested player with the specified id has a different name or price is missing. |
| 7 | LackOfMoney | The player has not enough money to buy the item from the seller. |
| 8 | MoneyOverflowOrNotEnoughSpace | The selling player cannot sell the item, because the sale would overflow his money amount in the inventory. Another possibility is that the inventory of the buyer cannot take the item. |
| 9 | ItemBlock | The requested player has item block active. |
72 changes: 72 additions & 0 deletions docs/Packets/C1-F3-00-CharacterListExtended_by-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# C1 F3 00 - CharacterListExtended (by server)

## Is sent when

After the game client requested it, usually after a successful login.

## Causes the following actions on the client side

The game client shows the available characters of the account.

## Structure

| Index | Length | Data Type | Value | Description |
|-------|--------|-----------|-------|-------------|
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
| 1 | 1 | Byte | | Packet header - length of the packet |
| 2 | 1 | Byte | 0xF3 | Packet header - packet type identifier |
| 3 | 1 | Byte | 0x00 | Packet header - sub packet type identifier |
| 4 | 1 | CharacterCreationUnlockFlags | | UnlockFlags |
| 5 | 1 | Byte | | MoveCnt |
| 6 | 1 | Byte | | CharacterCount |
| 7 | 1 | Boolean | | IsVaultExtended |
| 8 | CharacterData.Length * CharacterCount | Array of CharacterData | | Characters |

### CharacterData Structure

Data of one character in the list.

Length: 44 Bytes

| Index | Length | Data Type | Value | Description |
|-------|--------|-----------|-------|-------------|
| 0 | 1 | Byte | | SlotIndex |
| 1 | 10 | String | | Name |
| 12 | 2 | ShortLittleEndian | | Level |
| 14 | 4 bit | CharacterStatus | | Status |
| 14 << 4 | 1 bit | Boolean | | IsItemBlockActive |
| 15 | 27 | Binary | | Appearance |
| 42 | 1 | GuildMemberRole | | GuildPosition |

### CharacterStatus Enum

The status of a character.

| Value | Name | Description |
|-------|------|-------------|
| 0 | Normal | The state of the character is normal. |
| 1 | Banned | The character is banned from the game. |
| 32 | GameMaster | The character is a game master. |

### GuildMemberRole Enum

Defines the role of a guild member.

| Value | Name | Description |
|-------|------|-------------|
| 0 | NormalMember | The member is a normal member without special rights. |
| 32 | BattleMaster | The member is a battle master. |
| 128 | GuildMaster | The member is the guild master. |
| 255 | Undefined | The character is not a member, therefore the role is undefined. |

### CharacterCreationUnlockFlags Enum

The flags to unlock the specified character classes for the creation of new characters.

| Value | Name | Description |
|-------|------|-------------|
| 0 | None | No unlocked class. |
| 1 | Summoner | Unlocks the summoner class. |
| 2 | DarkLord | Unlocks the dark lord class. |
| 4 | MagicGladiator | Unlocks the magic gladiator class. |
| 8 | RageFighter | Unlocks the rage fighter class. |
28 changes: 28 additions & 0 deletions docs/Packets/C1-F3-05-CharacterLevelUpdateExtended_by-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# C1 F3 05 - CharacterLevelUpdateExtended (by server)

## Is sent when

After a character leveled up.

## Causes the following actions on the client side

Updates the level (and other related stats) in the game client and shows an effect.

## Structure

| Index | Length | Data Type | Value | Description |
|-------|--------|-----------|-------|-------------|
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
| 1 | 1 | Byte | 32 | Packet header - length of the packet |
| 2 | 1 | Byte | 0xF3 | Packet header - packet type identifier |
| 3 | 1 | Byte | 0x05 | Packet header - sub packet type identifier |
| 4 | 2 | ShortLittleEndian | | Level |
| 6 | 2 | ShortLittleEndian | | LevelUpPoints |
| 8 | 4 | IntegerLittleEndian | | MaximumHealth |
| 12 | 4 | IntegerLittleEndian | | MaximumMana |
| 16 | 4 | IntegerLittleEndian | | MaximumShield |
| 20 | 4 | IntegerLittleEndian | | MaximumAbility |
| 24 | 2 | ShortLittleEndian | | FruitPoints |
| 26 | 2 | ShortLittleEndian | | MaximumFruitPoints |
| 28 | 2 | ShortLittleEndian | | NegativeFruitPoints |
| 30 | 2 | ShortLittleEndian | | MaximumNegativeFruitPoints |
Loading
Loading