-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some adjustments and extensions for the network protocol
- Loading branch information
Showing
56 changed files
with
4,762 additions
and
559 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
docs/Packets/C1-3F-06-PlayerShopBuyResultExtended_by-server.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# C1 F6 0C - QuestProgressExtended (by server) | ||
|
||
## Is sent when | ||
|
||
First, after the game client requested to initialize a quest and the quest is already active. Second, after the game client requested the next quest step. | ||
|
||
## Causes the following actions on the client side | ||
|
||
The client shows the quest progress accordingly. | ||
|
||
## Structure | ||
|
||
| Index | Length | Data Type | Value | Description | | ||
|-------|--------|-----------|-------|-------------| | ||
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) | | ||
| 1 | 1 | Byte | 272 | Packet header - length of the packet | | ||
| 2 | 1 | Byte | 0xF6 | Packet header - packet type identifier | | ||
| 3 | 1 | Byte | 0x0C | Packet header - sub packet type identifier | | ||
| 5 | 1 | Byte | | ConditionCount | | ||
| 6 | 1 | Byte | | RewardCount | | ||
| 7 | 1 | Byte | | RandomRewardCount | | ||
| 8 | 2 | ShortLittleEndian | | QuestNumber | | ||
| 10 | 2 | ShortLittleEndian | | QuestGroup | | ||
| 12 | QuestConditionExtended.Length * ConditionCount | Array of QuestConditionExtended | | Conditions | | ||
| 152 | QuestRewardExtended.Length * RewardCount | Array of QuestRewardExtended | | Rewards | | ||
|
||
### QuestConditionExtended Structure | ||
|
||
Defines a condition which must be fulfilled to complete the quest. | ||
|
||
Length: 28 Bytes | ||
|
||
| Index | Length | Data Type | Value | Description | | ||
|-------|--------|-----------|-------|-------------| | ||
| 0 | 1 | ConditionType | | Type | | ||
| 2 | 2 | ShortLittleEndian | | RequirementId; Depending on the condition type, this field contains the identifier of the required thing, e.g. Monster Number, Item Id, Level. | | ||
| 4 | 4 | IntegerLittleEndian | | RequiredCount | | ||
| 8 | 4 | IntegerLittleEndian | | CurrentCount | | ||
| 12 | 15 | Binary | | RequiredItemData; If the condition type is 'Item', this field contains the item data, excluding the item id. The item id can be found in the RequirementId field. | | ||
|
||
### ConditionType Enum | ||
|
||
Defines the type of the condition. | ||
|
||
| Value | Name | Description | | ||
|-------|------|-------------| | ||
| 0 | None | No condition is defined. | | ||
| 1 | MonsterKills | The condition is to kill a specified amount of specified monsters. | | ||
| 2 | Skill | The condition is to learn a specified skill. | | ||
| 4 | Item | The condition is to find a specified item and to have it in the inventory. | | ||
| 8 | Level | The condition is to reach the specified character level. | | ||
| 16 | ClientAction | The condition is a client action. For example, this may be the completion of a tutorial. | | ||
| 32 | RequestBuff | The condition is to request a buff from an NPC. | | ||
| 64 | EventMapPlayerKills | The condition is to kill a specific amount of players in an event. | | ||
| 65 | EventMapMonsterKills | The condition is to kill a specific amount of monsters in an event. | | ||
| 66 | BloodCastleGate | The condition is to destroy the blood castle gate. | | ||
| 256 | WinBloodCastle | The condition is to win the blood castle event. | | ||
| 257 | WinChaosCastle | The condition is to win the chaos castle. | | ||
| 258 | WinDevilSquare | The condition is to win the devil square event. | | ||
| 259 | WinIllusionTemple | The condition is to win the illusion temple event. | | ||
| 260 | DevilSquarePoints | The condition is to reach a specific amount of points in the devil square event. | | ||
| 261 | Money | The condition is to give a specific amount of zen. | | ||
| 262 | PvpPoints | The condition is to reach a specific amount of PVP points. | | ||
| 263 | NpcTalk | The condition is to talk to a specific NPC. | | ||
|
||
### QuestRewardExtended Structure | ||
|
||
Defines a reward which is given when the quest is completed. | ||
|
||
Length: 24 Bytes | ||
|
||
| Index | Length | Data Type | Value | Description | | ||
|-------|--------|-----------|-------|-------------| | ||
| 0 | 1 | RewardType | | Type | | ||
| 2 | 2 | ShortLittleEndian | | RewardId; Depending on the condition type, this field contains the identifier of the required thing, e.g. Monster Number, Item Id, Level. | | ||
| 4 | 4 | IntegerLittleEndian | | RewardCount | | ||
| 8 | 15 | Binary | | RewardedItemData; If the reward type is 'Item', this field contains its item data. | | ||
|
||
### RewardType Enum | ||
|
||
Defines the reward which is given when the quest is completed. | ||
|
||
| Value | Name | Description | | ||
|-------|------|-------------| | ||
| 0 | None | No reward is defined. | | ||
| 1 | Experience | The reward is added experience to the character. | | ||
| 2 | Money | The reward is added money to the inventory. | | ||
| 4 | Item | The reward is an item which is added to the inventory. | | ||
| 16 | GensContribution | The reward is added gens contribution points. | | ||
| 32 | Random | The reward is random?. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
docs/Packets/C2-12-AddCharacterToScopeExtended_by-server.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# C2 12 - AddCharacterToScopeExtended (by server) | ||
|
||
## Is sent when | ||
|
||
One or more character got into the observed scope of the player. | ||
|
||
## Causes the following actions on the client side | ||
|
||
The client adds the character to the shown map. | ||
|
||
## Structure | ||
|
||
| Index | Length | Data Type | Value | Description | | ||
|-------|--------|-----------|-------|-------------| | ||
| 0 | 1 | Byte | 0xC2 | [Packet type](PacketTypes.md) | | ||
| 1 | 2 | Short | | Packet header - length of the packet | | ||
| 3 | 1 | Byte | 0x12 | Packet header - packet type identifier | | ||
| 4 | 2 | ShortLittleEndian | | Id | | ||
| 6 | 1 | Byte | | CurrentPositionX | | ||
| 7 | 1 | Byte | | CurrentPositionY | | ||
| 8 | 1 | Byte | | TargetPositionX | | ||
| 9 | 1 | Byte | | TargetPositionY | | ||
| 10 | 4 bit | Byte | | Rotation | | ||
| 10 << 0 | 4 bit | CharacterHeroState | | HeroState | | ||
| 12 | 2 | ShortLittleEndian | | AttackSpeed | | ||
| 14 | 2 | ShortLittleEndian | | MagicSpeed | | ||
| 16 | 10 | String | | Name | | ||
| 26 | | Binary | | AppearanceAndEffects | | ||
|
||
### CharacterHeroState Enum | ||
|
||
Defines the hero state of a character. | ||
|
||
| Value | Name | Description | | ||
|-------|------|-------------| | ||
| 0 | New | The character is new and has the highest state. | | ||
| 1 | Hero | The character is a hero. | | ||
| 2 | LightHero | The character is a hero, but the state is almost gone. | | ||
| 3 | Normal | The character is in a neutral state. | | ||
| 4 | PlayerKillWarning | The character killed another character, and has a kill warning. | | ||
| 5 | PlayerKiller1stStage | The character killed two characters, and has some restrictions. | | ||
| 6 | PlayerKiller2ndStage | The character killed more than two characters, and has hard restrictions. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# C2 2F - MoneyDroppedExtended (by server) | ||
|
||
## Is sent when | ||
|
||
Money dropped on the ground. | ||
|
||
## Causes the following actions on the client side | ||
|
||
The client adds the money to the ground. | ||
|
||
## Structure | ||
|
||
| Index | Length | Data Type | Value | Description | | ||
|-------|--------|-----------|-------|-------------| | ||
| 0 | 1 | Byte | 0xC2 | [Packet type](PacketTypes.md) | | ||
| 1 | 2 | Short | 12 | Packet header - length of the packet | | ||
| 3 | 1 | Byte | 0x2F | Packet header - packet type identifier | | ||
| 3 | 1 | Boolean | | IsFreshDrop; If this flag is set, the money is added to the map with an animation and sound. Otherwise, it's just added like it was already on the ground before. | | ||
| 4 | 2 | ShortLittleEndian | | Id | | ||
| 6 | 1 | Byte | | PositionX | | ||
| 7 | 1 | Byte | | PositionY | | ||
| 8 | 4 | IntegerLittleEndian | | Amount | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.