public override void Abort(params object[] Args) { try { String[] infos = Array.ConvertAll(Args, p => (p ?? String.Empty).ToString()); int qID = int.Parse(infos[0]); int rID = int.Parse(infos[1]); if (this.Client.Character.myMap.getNPC(NpcID) != null) { this.EndExecute(); } NpcReply rep = NpcReplyTable.get(rID); if (rep == null) { this.EndExecute(); } if (rep.isAnotherDialog()) { this.EndExecute(); } rep.apply(this.Client.Character); } catch (Exception e) { this.EndExecute(); } base.Abort(Args); }
public virtual void Reply(short replyId) { NpcMessage currentMessage = this.CurrentMessage; NpcReply[] array = ( from entry in this.CurrentMessage.Replies where entry.ReplyId == (int)replyId select entry).ToArray <NpcReply>(); if (array.Any((NpcReply x) => !x.CanExecute(this.Npc, this.Character))) { this.Character.SendInformationMessage(TextInformationTypeEnum.TEXT_INFORMATION_ERROR, 34, new object[0]); } else { NpcReply[] array2 = array; for (int i = 0; i < array2.Length; i++) { NpcReply reply = array2[i]; this.Reply(reply); } if (array.Length == 0 || currentMessage == this.CurrentMessage) { this.Close(); } } }
public void Reply(NpcReply reply) { reply.Execute(Npc, Character); }
public void Reply(NpcReply reply) { reply.Execute(this.Npc, this.Character); }