private static ActivityBase BuildRefreshCreatureActivity(CreatureRefreshPack pack) { if (pack == null) { throw new ArgumentNullException("RefreshCreaturePack"); } CallbackActivity activity = new CallbackActivity( (gameInterface) => { gameInterface.RefreshCreature(pack.Creature); }); return(activity); }
public override void OnEnter() { base.OnEnter(); // Calculcate the moving scopes and save it in cache if (moveRange == null) { MoveRangeFinder finder = new MoveRangeFinder(gameAction, this.creature); moveRange = finder.CalculateMoveRange(); } // If the creature has moved, reset the creature position this.creature.ResetPosition(); CreatureRefreshPack reset = new CreatureRefreshPack(this.creature.Clone()); SendPack(reset); ShowRangePack showRange = new ShowRangePack(moveRange); SendPack(showRange); }