public void AddSpell(TrainerSpellEntry entry) { if (Spells.Count == 0) { SetupTrainer(entry.Spell); } if (!Spells.ContainsKey(entry.SpellId)) { Spells.Add(entry.SpellId, entry); entry.Index = lastIndex++; } }
public void AddSpell(TrainerSpellEntry entry) { if (this.Spells.Count == 0) { this.SetupTrainer(entry.Spell); } if (this.Spells.ContainsKey(entry.SpellId)) { return; } this.Spells.Add(entry.SpellId, entry); entry.Index = this.lastIndex++; }
public static void SendTrainerBuySucceeded(IPacketReceiver client, NPC trainer, TrainerSpellEntry spell) { using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_TRAINER_BUY_SUCCEEDED, 8 + 4)) { packet.Write(trainer.EntityId); packet.Write(spell.Spell.Id); client.Send(packet); } }