Example #1
0
 /// <summary>
 /// Selects a given actor
 /// </summary>
 /// <param name="target"></param>
 /// <param name="item"></param>
 public static void SelectActor(Character target, MapObject item)
 {
     ISelectAble current = item as ISelectAble;
     if (current != null)
     {
         target._targetid = item.id;
         SMSG_ACTORSELECTION spkt = new SMSG_ACTORSELECTION();
         spkt.SessionId = target.id;
         spkt.MaxHP = current.HPMAX;
         spkt.HP = current.HP;
         spkt.MaxSP = current.SPMAX;
         spkt.SP = current.SP;
         spkt.SourceActorID = target.id;
         spkt.TargetActorID = target._targetid;
         target.client.Send((byte[])spkt);
         target._target = target;
     }
 }
Example #2
0
 /// <summary>
 /// Selects a given actor
 /// </summary>
 /// <param name="target"></param>
 /// <param name="item"></param>
 public static void SelectActor(Character target, Actor item)
 {
     target._targetid = item.id;
     SMSG_ACTORSELECTION spkt = new SMSG_ACTORSELECTION();
     spkt.SessionId = target.id;
     spkt.MaxHP = item.HPMAX;
     spkt.HP = item.HP;
     spkt.MaxSP = item.SPMAX;
     spkt.SP = item.SP;
     spkt.SourceActorID = target.id;
     spkt.TargetActorID = target._targetid;
     target.client.Send((byte[])spkt);
     target._target = item;
 }