-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server select visual fix, new applydamage packet struct
- Loading branch information
Showing
9 changed files
with
97 additions
and
23 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
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
44 changes: 44 additions & 0 deletions
44
l2-unity/Assets/Scripts/Networking/ClientLibrary/Model/Hit.cs
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,44 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
public class Hit | ||
{ | ||
private static int HITFLAG_USESS = 0x10; | ||
private static int HITFLAG_CRIT = 0x20; | ||
private static int HITFLAG_SHLD = 0x40; | ||
private static int HITFLAG_MISS = 0x80; | ||
|
||
private int _targetId; | ||
private int _damage; | ||
private int _flags = 0; | ||
|
||
public int TargetId { get { return _targetId; } } | ||
public int Damage { get { return _damage; } } | ||
|
||
public Hit(int targetId, int damage, int flags) { | ||
this._targetId = targetId; | ||
this._damage = damage; | ||
this._flags = flags; | ||
} | ||
|
||
public bool isCrit() { | ||
return (_flags & HITFLAG_CRIT) != 0; | ||
} | ||
|
||
public bool isMiss() { | ||
return (_flags & HITFLAG_MISS) != 0; | ||
} | ||
|
||
public bool hasSoulshot() { | ||
return (_flags & HITFLAG_USESS) != 0; | ||
} | ||
|
||
public bool isShielded() { | ||
return (_flags & HITFLAG_SHLD) != 0; | ||
} | ||
|
||
public int getSsGrade() { | ||
return _flags & 0x0F; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
l2-unity/Assets/Scripts/Networking/ClientLibrary/Model/Hit.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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