From 2d1521dea9d75d47b8f1de52cebe529d14506cfd Mon Sep 17 00:00:00 2001 From: QAston Date: Sun, 26 Apr 2009 02:48:20 +0200 Subject: *Fix CAST_INTURRUPT_PREVIOUS flag for eventai action cast *Rewrite .reload all pet_spells command to make it reset actionbars correctly. --HG-- branch : trunk --- src/game/Level3.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/game/Level3.cpp') diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 4b7fce652f5..ae1b0933bbf 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -5392,8 +5392,13 @@ bool ChatHandler::HandleResetAllCommand(const char * args) } else if(casename=="pet_spells") { - atLogin = AT_LOGIN_RESET_PET_SPELLS; + CharacterDatabase.PExecute("UPDATE character_pet SET load_flags = load_flags | '%u' WHERE (load_flags & '%u') = '0'",uint32(AT_LOAD_RESET_SPELLS),uint32(AT_LOAD_RESET_SPELLS)); + HashMapHolder::MapType const& plist = ObjectAccessor::Instance().GetPlayers(); + for(HashMapHolder::MapType::const_iterator itr = plist.begin(); itr != plist.end(); ++itr) + if (itr->second->GetPet()) + itr->second->SetPetAtLoginFlag(AT_LOAD_RESET_SPELLS); sWorld.SendWorldText(LANG_RESETALL_PET_SPELLS); + return true; } else { -- cgit v1.2.3