Skip to content

Commit

Permalink
Added documentation for hit packets
Browse files Browse the repository at this point in the history
  • Loading branch information
sven-n committed Dec 1, 2017
1 parent c2baa73 commit 6e10783
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 5 deletions.
6 changes: 4 additions & 2 deletions doc/MUnique.OpenMU.Documentation.proj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<None Include="packages.config" />
<Pandoc Include="Packets\C1F330 - Save key configuration.md" />
<Pandoc Include="Packets\C1F352 - Master skill level increase request.md" />
<None Include="Packets\C111 - Hit response.md" />
<None Include="Packets\C111 - Hit request.md" />
<None Include="Packets\C1F352 - Master skill level increase response.md" />
<None Include="Progress.md" />
<None Include="Readme.md" />
Expand All @@ -40,8 +42,8 @@
<Pandoc Include="Packets\C1F301 - Character creation request.md" />
<None Include="Packets\Template.md" />
</ItemGroup>
<Target Name="Build"/>
<Target Name="Rebuild" DependsOnTargets="Build"/>
<Target Name="Build" />
<Target Name="Rebuild" DependsOnTargets="Build" />
<!--Target Name="Build" DependsOnTargets="EnsureNuGetPackageBuildImports;Pandoc" /-->
<!--Import Project="..\src\packages\PandocTasks.0.1.2\build\PandocTasks.targets" Condition="Exists('..\src\packages\PandocTasks.0.1.2\build\PandocTasks.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
Expand Down
26 changes: 26 additions & 0 deletions doc/Packets/C111 - Hit request.md
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 |
38 changes: 38 additions & 0 deletions doc/Packets/C111 - Hit response.md
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 |
6 changes: 3 additions & 3 deletions doc/Progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ Complexity 0 means we wont implement it.
| - *Save key configuration* | [0xF330][0xF330] | | | |
| - *Master skill level increase request* | [0xF352][0xF352] | | |
| CashShopGroup | 0xF5 | 0% | 10 | Low priority |
| *Hit* | Protocol.Hit | 100% | 10 | |
| *Teleport* | Protocol.Teleport | 100% | 2 | |
| *Walk* | Protocol.Walk | 100% | 10 | |
| *Hit* | 0x11 | 100% | 10 | |
| *Teleport* | 0x15 | 100% | 2 | |
| *Walk* | 0xD4 | 100% | 10 | |

[0x00]: C100%20-%20Chat%20message%20(by%20client).md
[0x02]: C102%20-%20Whispered%20chat%20message.md
Expand Down

0 comments on commit 6e10783

Please sign in to comment.