rendered paste bodyclass KingMagniAI : public CreatureAIScript{public: ADD_CREATURE_FACTORY_FUNCTION(KingMagniAI); KingMagniAI(Creature* pCreature) : CreatureAIScript(pCreature) { } void GossipHello(Creature* pCreature, Player* Plr, bool AutoSend) { GossipMenu *Menu; objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 0, Plr); Menu->AddItem( 1, "I would like to browse your goods.", 1 ); Menu->AddItem( 0, "I would like to reset my talents.", 2 ); Menu->SendTo(Plr); } void GossipSelectOption(Creature* pCreature, Player* Plr, uint32 Id, uint32 IntId) { switch(IntId) { case 1: Plr->GetSession()->SendInventoryList(pCreature); break; case 2: Plr->Reset_Talents(); std::stringstream ss; ss << "Good luck, " << Plr->GetName(); pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, ss.str().c_str()); break; }}};void SetupBattleground(ScriptMgr * mgr){ mgr->register_creature_script(STORMPIKE_BATTLEMASTER, &StormpikeGuardAI::Create); mgr->register_creature_script(KING_MAGNI_BRONZEBEARD, &KingMagniAI::Create); mgr->register_creature_script(THRALL, &KingMagniAI::Create);}