Skip to content

Commit 50489a9

Browse files
committed
Extended protocol to solve some limitations
Now we can transmit values of Health, Shield, Mana, AG, Damage, Experience above 65k. I widened all to 32 bit. Additionally, I added a message to add more than one statpoint at a time. These changes will be added to my MuMain sources soon as well.
1 parent 9f35daf commit 50489a9

File tree

36 files changed

+10009
-4666
lines changed

36 files changed

+10009
-4666
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# C1 11 - ObjectHitExtended (by server)
2+
3+
## Is sent when
4+
5+
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.
6+
7+
## Causes the following actions on the client side
8+
9+
The damage is shown at the object which received the hit.
10+
11+
## Structure
12+
13+
| Index | Length | Data Type | Value | Description |
14+
|-------|--------|-----------|-------|-------------|
15+
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
16+
| 1 | 1 | Byte | 16 | Packet header - length of the packet |
17+
| 2 | 1 | Byte | 0x11 | Packet header - packet type identifier |
18+
| 3 << 0 | 4 bit | DamageKind | | Kind |
19+
| 3 << 6 | 1 bit | Boolean | | IsDoubleDamage |
20+
| 3 << 7 | 1 bit | Boolean | | IsTripleDamage |
21+
| 4 | 2 | ShortLittleEndian | | ObjectId |
22+
| 8 | 4 | IntegerLittleEndian | | HealthDamage |
23+
| 12 | 4 | IntegerLittleEndian | | ShieldDamage |
24+
25+
### DamageKind Enum
26+
27+
Defines the kind of the damage.
28+
29+
| Value | Name | Description |
30+
|-------|------|-------------|
31+
| 0 | NormalRed | Red color, used by normal damage. |
32+
| 1 | IgnoreDefenseCyan | Cyan color, usually used by ignore defense damage. |
33+
| 2 | ExcellentLightGreen | Light green color, usually used by excellent damage. |
34+
| 3 | CriticalBlue | Blue color, usually used by critical damage. |
35+
| 4 | LightPink | Light pink color. |
36+
| 5 | PoisonDarkGreen | Dark green color, usually used by poison damage. |
37+
| 6 | ReflectedDarkPink | Dark pink color, usually used by reflected damage. |
38+
| 7 | White | White color. |
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# C1 26 FD - ItemConsumptionFailedExtended (by server)
2+
3+
## Is sent when
4+
5+
When the consumption of an item failed.
6+
7+
## Causes the following actions on the client side
8+
9+
The game client gets a feedback about a failed consumption, and allows for do further consumption requests.
10+
11+
## Structure
12+
13+
| Index | Length | Data Type | Value | Description |
14+
|-------|--------|-----------|-------|-------------|
15+
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
16+
| 1 | 1 | Byte | 12 | Packet header - length of the packet |
17+
| 2 | 1 | Byte | 0x26 | Packet header - packet type identifier |
18+
| 3 | 1 | Byte | 0xFD | Packet header - sub packet type identifier |
19+
| 4 | 4 | IntegerLittleEndian | | Health |
20+
| 8 | 4 | IntegerLittleEndian | | Shield |
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# C1 26 FE - MaximumHealthAndShieldExtended (by server)
2+
3+
## Is sent when
4+
5+
When the maximum health changed, e.g. by adding stat points or changed items.
6+
7+
## Causes the following actions on the client side
8+
9+
The health and shield bar is updated on the game client user interface.
10+
11+
## Structure
12+
13+
| Index | Length | Data Type | Value | Description |
14+
|-------|--------|-----------|-------|-------------|
15+
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
16+
| 1 | 1 | Byte | 12 | Packet header - length of the packet |
17+
| 2 | 1 | Byte | 0x26 | Packet header - packet type identifier |
18+
| 3 | 1 | Byte | 0xFE | Packet header - sub packet type identifier |
19+
| 4 | 4 | IntegerLittleEndian | | Health |
20+
| 8 | 4 | IntegerLittleEndian | | Shield |
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# C1 26 FF - CurrentHealthAndShieldExtended (by server)
2+
3+
## Is sent when
4+
5+
Periodically, or if the current health or shield changed on the server side, e.g. by hits.
6+
7+
## Causes the following actions on the client side
8+
9+
The health and shield bar is updated on the game client user interface.
10+
11+
## Structure
12+
13+
| Index | Length | Data Type | Value | Description |
14+
|-------|--------|-----------|-------|-------------|
15+
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
16+
| 1 | 1 | Byte | 12 | Packet header - length of the packet |
17+
| 2 | 1 | Byte | 0x26 | Packet header - packet type identifier |
18+
| 3 | 1 | Byte | 0xFF | Packet header - sub packet type identifier |
19+
| 4 | 4 | IntegerLittleEndian | | Health |
20+
| 8 | 4 | IntegerLittleEndian | | Shield |
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# C1 27 FE - MaximumManaAndAbilityExtended (by server)
2+
3+
## Is sent when
4+
5+
The maximum available mana or ability has changed, e.g. by adding stat points.
6+
7+
## Causes the following actions on the client side
8+
9+
The mana and ability bar is updated on the game client user interface.
10+
11+
## Structure
12+
13+
| Index | Length | Data Type | Value | Description |
14+
|-------|--------|-----------|-------|-------------|
15+
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
16+
| 1 | 1 | Byte | 12 | Packet header - length of the packet |
17+
| 2 | 1 | Byte | 0x27 | Packet header - packet type identifier |
18+
| 3 | 1 | Byte | 0xFE | Packet header - sub packet type identifier |
19+
| 4 | 4 | IntegerLittleEndian | | Mana |
20+
| 8 | 4 | IntegerLittleEndian | | Ability |
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# C1 27 FF - CurrentManaAndAbilityExtended (by server)
2+
3+
## Is sent when
4+
5+
The currently available mana or ability has changed, e.g. by using a skill.
6+
7+
## Causes the following actions on the client side
8+
9+
The mana and ability bar is updated on the game client user interface.
10+
11+
## Structure
12+
13+
| Index | Length | Data Type | Value | Description |
14+
|-------|--------|-----------|-------|-------------|
15+
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
16+
| 1 | 1 | Byte | 12 | Packet header - length of the packet |
17+
| 2 | 1 | Byte | 0x27 | Packet header - packet type identifier |
18+
| 3 | 1 | Byte | 0xFF | Packet header - sub packet type identifier |
19+
| 4 | 4 | IntegerLittleEndian | | Mana |
20+
| 8 | 4 | IntegerLittleEndian | | Ability |
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# C1 F3 05 - CharacterLevelUpdateExtended (by server)
2+
3+
## Is sent when
4+
5+
After a character leveled up.
6+
7+
## Causes the following actions on the client side
8+
9+
Updates the level (and other related stats) in the game client and shows an effect.
10+
11+
## Structure
12+
13+
| Index | Length | Data Type | Value | Description |
14+
|-------|--------|-----------|-------|-------------|
15+
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
16+
| 1 | 1 | Byte | 32 | Packet header - length of the packet |
17+
| 2 | 1 | Byte | 0xF3 | Packet header - packet type identifier |
18+
| 3 | 1 | Byte | 0x05 | Packet header - sub packet type identifier |
19+
| 4 | 2 | ShortLittleEndian | | Level |
20+
| 6 | 2 | ShortLittleEndian | | LevelUpPoints |
21+
| 8 | 4 | IntegerLittleEndian | | MaximumHealth |
22+
| 12 | 4 | IntegerLittleEndian | | MaximumMana |
23+
| 16 | 4 | IntegerLittleEndian | | MaximumShield |
24+
| 20 | 4 | IntegerLittleEndian | | MaximumAbility |
25+
| 24 | 2 | ShortLittleEndian | | FruitPoints |
26+
| 26 | 2 | ShortLittleEndian | | MaximumFruitPoints |
27+
| 28 | 2 | ShortLittleEndian | | NegativeFruitPoints |
28+
| 30 | 2 | ShortLittleEndian | | MaximumNegativeFruitPoints |
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# C1 F3 06 - CharacterStatIncreaseResponseExtended (by server)
2+
3+
## Is sent when
4+
5+
After the server processed a character stat increase request packet.
6+
7+
## Causes the following actions on the client side
8+
9+
If it was successful, adds a point to the requested stat type.
10+
11+
## Structure
12+
13+
| Index | Length | Data Type | Value | Description |
14+
|-------|--------|-----------|-------|-------------|
15+
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
16+
| 1 | 1 | Byte | 24 | Packet header - length of the packet |
17+
| 2 | 1 | Byte | 0xF3 | Packet header - packet type identifier |
18+
| 3 | 1 | Byte | 0x06 | Packet header - sub packet type identifier |
19+
| 4 | 1 | CharacterStatAttribute | | Attribute |
20+
| 6 | 2 | ShortLittleEndian | | AddedAmount |
21+
| 8 | 4 | IntegerLittleEndian | | UpdatedMaximumHealth |
22+
| 12 | 4 | IntegerLittleEndian | | UpdatedMaximumMana |
23+
| 16 | 4 | IntegerLittleEndian | | UpdatedMaximumShield |
24+
| 20 | 4 | IntegerLittleEndian | | UpdatedMaximumAbility |
25+
26+
### CharacterStatAttribute Enum
27+
28+
Defines the type of a character stat attribute.
29+
30+
| Value | Name | Description |
31+
|-------|------|-------------|
32+
| 0 | Strength | The strength attribute. |
33+
| 1 | Agility | The agility attribute. |
34+
| 2 | Vitality | The vitality attribute. |
35+
| 3 | Energy | The energy attribute. |
36+
| 4 | Leadership | The leadership attribute. |
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# C1 F3 50 - MasterStatsUpdateExtended (by server)
2+
3+
## Is sent when
4+
5+
After entering the game with a master class character.
6+
7+
## Causes the following actions on the client side
8+
9+
The master related data is available.
10+
11+
## Structure
12+
13+
| Index | Length | Data Type | Value | Description |
14+
|-------|--------|-----------|-------|-------------|
15+
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
16+
| 1 | 1 | Byte | 40 | Packet header - length of the packet |
17+
| 2 | 1 | Byte | 0xF3 | Packet header - packet type identifier |
18+
| 3 | 1 | Byte | 0x50 | Packet header - sub packet type identifier |
19+
| 4 | 2 | ShortLittleEndian | | MasterLevel |
20+
| 6 | 8 | LongBigEndian | | MasterExperience |
21+
| 14 | 8 | LongBigEndian | | MasterExperienceOfNextLevel |
22+
| 22 | 2 | ShortLittleEndian | | MasterLevelUpPoints |
23+
| 24 | 4 | IntegerLittleEndian | | MaximumHealth |
24+
| 28 | 4 | IntegerLittleEndian | | MaximumMana |
25+
| 32 | 4 | IntegerLittleEndian | | MaximumShield |
26+
| 36 | 4 | IntegerLittleEndian | | MaximumAbility |
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# C1 F3 51 - MasterCharacterLevelUpdateExtended (by server)
2+
3+
## Is sent when
4+
5+
After a master character leveled up.
6+
7+
## Causes the following actions on the client side
8+
9+
Updates the master level (and other related stats) in the game client and shows an effect.
10+
11+
## Structure
12+
13+
| Index | Length | Data Type | Value | Description |
14+
|-------|--------|-----------|-------|-------------|
15+
| 0 | 1 | Byte | 0xC1 | [Packet type](PacketTypes.md) |
16+
| 1 | 1 | Byte | 28 | Packet header - length of the packet |
17+
| 2 | 1 | Byte | 0xF3 | Packet header - packet type identifier |
18+
| 3 | 1 | Byte | 0x51 | Packet header - sub packet type identifier |
19+
| 4 | 2 | ShortLittleEndian | | MasterLevel |
20+
| 6 | 2 | ShortLittleEndian | | GainedMasterPoints |
21+
| 8 | 2 | ShortLittleEndian | | CurrentMasterPoints |
22+
| 10 | 2 | ShortLittleEndian | | MaximumMasterPoints |
23+
| 12 | 4 | IntegerLittleEndian | | MaximumHealth |
24+
| 16 | 4 | IntegerLittleEndian | | MaximumMana |
25+
| 20 | 4 | IntegerLittleEndian | | MaximumShield |
26+
| 24 | 4 | IntegerLittleEndian | | MaximumAbility |

0 commit comments

Comments
 (0)