private static ActivityBase BuildShowCreatureInfoActivity(CreatureShowInfoPack pack) { if (pack == null) { throw new ArgumentNullException("pack"); } FDCreature creature = pack.Creature; CreatureDialog.ShowType showType = CreatureDialog.ShowType.SelectAllItem; switch (pack.InfoType) { case CreatureInfoType.SelectAllItem: showType = CreatureDialog.ShowType.SelectAllItem; break; case CreatureInfoType.SelectEquipItem: showType = CreatureDialog.ShowType.SelectEquipItem; break; case CreatureInfoType.SelectUseItem: showType = CreatureDialog.ShowType.SelectUseItem; break; case CreatureInfoType.SelectMagic: showType = CreatureDialog.ShowType.SelectMagic; break; case CreatureInfoType.View: showType = CreatureDialog.ShowType.ViewItem; break; default: showType = CreatureDialog.ShowType.SelectAllItem; break; } CallbackActivity activity = new CallbackActivity( (gameInterface) => { gameInterface.ShowCreatureDialog(pack.Creature, showType); }); if (pack.InfoType == CreatureInfoType.View && creature.Data.HasMagic()) { SequenceActivity sequenceActivity = new SequenceActivity(); sequenceActivity.Add(activity); CallbackActivity activity2 = new CallbackActivity( (gameInterface) => { gameInterface.ShowCreatureDialog(pack.Creature, CreatureDialog.ShowType.ViewMagic); }); sequenceActivity.Add(activity2); return(sequenceActivity); } return(activity); }
private static ActivityBase BuildComposeCreatureActivity(CreatureComposePack pack) { if (pack == null) { throw new ArgumentNullException("CreatureMovePack"); } CallbackActivity act = new CallbackActivity( (callback) => { callback.PlaceCreature(pack.CreatureId, pack.AnimationId, pack.Position); }); return(act); }
private static ActivityBase BuildShowRangeActivity(ShowRangePack pack) { if (pack == null) { throw new ArgumentNullException("pack"); } CallbackActivity activity = new CallbackActivity( (gameInterface) => { gameInterface.PlaceIndicators(pack.Range); }); return(activity); }
private static ActivityBase BuildRefreshAllCreaturesActivity(CreatureRefreshAllPack pack) { if (pack == null) { throw new ArgumentNullException("RefreshCreaturePack"); } CallbackActivity activity = new CallbackActivity( (gameInterface) => { gameInterface.RefreshAllCreatures(); }); return(activity); }
private static ActivityBase BuildCreatureDisposeActivity(CreatureDisposePack pack) { if (pack == null) { throw new ArgumentNullException("CreatureDeadPack"); } CallbackActivity activity = new CallbackActivity( (gameInterface) => { gameInterface.DisposeCreature(pack.CreatureId); }); return(activity); }
private static ActivityBase BuildPromptActivity(PromptPack pack) { if (pack == null) { throw new ArgumentNullException("pack"); } CallbackActivity activity = new CallbackActivity((gameInterface) => { /// gameInterface.ShowPromptDialog(pack.AnimationId, pack.Content); }); return(activity); }
private static CallbackActivity BuildBattleFightActivity(BattleFightPack fightPack) { if (fightPack == null) { throw new ArgumentNullException("fightPack"); } FDCreature subject = fightPack.Subject; FDCreature target = fightPack.Target; FightInformation fightInfo = fightPack.FightInformation; CallbackActivity activity = new CallbackActivity( (gameInterface) => { gameInterface.BattleFight(subject, target, fightInfo); }); return(activity); }