-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
71 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# C1 11 - Hit request (by client) | ||
|
||
## Is sent when ## | ||
The client requests to hit another attackable game entity (monster, other player, etc.) with a normal physical hit - no skill is involved. | ||
|
||
|
||
## Causes the following actions on the server side ## | ||
The server first checks the state of the player. It must have a selected character and therefore on a game map instance. | ||
Then the server checks if the target is on the same game map, and if the attacking player is one of its observers. Otherwise a hacker could just send attack packets for targets placed all over the map. | ||
|
||
If all of these checks are done, the target is getting attacked by the player. | ||
|
||
The attacking player gets a [response](C111%20-%20Hit%20response.md) which includes the caused damage. If the target is a player as well, it gets the same response, too. | ||
|
||
All observing players are getting notified about this attack by an animation message, with the animation which is supplied in this message. The animation can be different for different types of equipped weapons. | ||
|
||
## Structure ## | ||
|
||
| Length | Data type | Value | Description | | ||
|----------|---------|-------------|---------| | ||
| 1 | byte | 0xC1 | [Packet type](PacketTypes.md) | | ||
| 1 | byte | [Length] | Packet header - length of the packet | | ||
| 1 | byte | 0x11 | Packet header - hit packet type identifier | | ||
| 1 | ushort | 0x2001 | Target-Id | | ||
| 1 | byte | 0x78 | Attack animation | | ||
| 1 | byte | 0x00 | Looking direction | |
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,38 @@ | ||
# C1 11 - Hit response (by server) | ||
|
||
## Is sent when ## | ||
The player of the connected client got hit or when a previously attacked target got hit. | ||
|
||
|
||
## Causes the following actions on the client side ## | ||
It shows the caused damage at the specified target object. | ||
|
||
## Structure ## | ||
|
||
| Length | Data type | Value | Description | | ||
|----------|---------|-------------|---------| | ||
| 1 | byte | 0xC1 | [Packet type](PacketTypes.md) | | ||
| 1 | byte | 0x0A | Packet header - length of the packet | | ||
| 1 | byte | 0x11 | Packet header - hit packet type identifier | | ||
| 1 | ushort | 0x2001 | Target-Id | | ||
| 1 | byte | 0x00 | Damage attributes | | ||
| 1 | ushort | | Damage to health attribute | | ||
| 1 | ushort | | Damage to shield attribute | | ||
|
||
|
||
### Damage Attributes | ||
Depending on the chances of some applied damage attributes, there are flags which are set in the damage attributes field. | ||
A value of 0x00 means, it's a normal hit without any special attributes. | ||
|
||
The first 4 bits are used for the kind of the damage. | ||
| Value | Description | | ||
|-------|-------------| | ||
| 0x01 | Damage was calculated by ignoring the defense of the target | | ||
| 0x02 | Damage was calculated with the excellent damage bonus of 20 % base damage | | ||
| 0x03 | Damage was calculated with the maximum base damage (critical damage) | | ||
|
||
The next attributes are used when the hit is applied multiple times. They can be OR-combined with the previous values. | ||
| Value | Description | | ||
|-------|-------------| | ||
| 0x40 | Damage was applied twice (Double damage) | | ||
| 0x80 | Damage was applied three times (Triple damage), e.g. by doing a combo skill combination | |
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