Example #1
0
 public DialogScript(DB_Dialog data, MapServer server)
 {
     _id      = data.Id;
     _server  = server;
     _npcs    = new WO_NPC[2];
     _entries = data.Entries;
 }
Example #2
0
 public void DialogEnd()
 {
     _dialog.Dialog.OnDialogEnd(this);
     _player.Rpc(13);
     _dialog = null;
     m_choices.Clear();
 }
Example #3
0
 public void Destroy()
 {
     _player.NetUserDataChanged -= Player_NetUserDataChanged;
     _save.Destroy();
     _object.Destroy();
     _pet?.Destroy();
     CharsMgr.SaveCharacter(_char);
     if (_dialog != null)
     {
         _dialog.Dialog.OnDialogEnd(this);
     }
     if (_shop != null)
     {
         _shop.Movement.Unlock();
     }
     foreach (var item in _clones.Values.ToArray())
     {
         item.Destroy();
     }
     _pet    = null;
     _save   = null;
     _shop   = null;
     _user   = null;
     _char   = null;
     _trade  = null;
     _items  = null;
     _clones = null;
     _dialog = null;
     _server = null;
     _player = null;
     _object = null;
     _skills = null;
 }
Example #4
0
 public DialogScript(DialogScript data)
 {
     _id     = data._id;
     _server = data._server;
     _npcs   = new WO_NPC[data._npcs.Length];
     for (int i = 0; i < _npcs.Length; i++)
     {
         _npcs[i] = data._npcs[i];
     }
     _entries = data._entries;
 }
Example #5
0
 public void DialogSetMessage(WO_NPC talker, string message, ushort emotion)
 {
     _player.Rpc(17, new DialogNetData(message, talker.NPC.Pony.Name, talker.SGuid, emotion));
 }
Example #6
0
        public void DialogSetMessage(WO_NPC talker, int message)
        {
            var entry = DataMgr.SelectMessage(message);

            _player.Rpc(17, new DialogNetData(entry.Item2.GetMessage(this), talker.NPC.Pony.Name, talker.SGuid, entry.Item1));
        }