Guest User

Untitled

a guest
Jun 6th, 2021
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.83 KB | None | 0 0
  1.  public MsgPlayerEx(Monster aMonster)
  2.             : base((UInt16)(154 + aMonster.Name.Length))
  3.  
  4.         {
  5.  
  6.  
  7.             Id = aMonster.UniqId;
  8.  
  9.             Mesh = aMonster.Look;
  10.  
  11.             PosX = aMonster.X;
  12.             PosY = aMonster.Y;
  13.  
  14.             Status = aMonster.Statuses;
  15.  
  16.             Life = (byte)aMonster.CurHP;
  17.             MonsterLevel = (byte)aMonster.Level;
  18.  
  19.             Direction = aMonster.Direction;
  20.             Pose = (Byte)aMonster.Action;
  21.             if (aMonster.CurHP > ushort.MaxValue)
  22.             {
  23.                 Life = (ushort)(ushort.MaxValue / aMonster.CurHP * 100);
  24.             }
  25.             else
  26.             {
  27.                 Life = (ushort)aMonster.CurHP;
  28.             }
  29.  
  30.             __StrPacker = new StringPacker(this, 152);
  31.             __StrPacker.AddString(aMonster.Name);
  32.         }
Advertisement
Add Comment
Please, Sign In to add comment