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/Player.cpp | 46 +--------------------------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) (limited to 'src/game/Player.cpp') diff --git a/src/game/Player.cpp b/src/game/Player.cpp index a400909a43e..d1bbaebd0d6 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -14524,12 +14524,6 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder ) InitTalentForLevel(); learnDefaultSpells(); - // must be done after aura loading for correct pet talent amount calculation - if(HasAtLoginFlag(AT_LOGIN_RESET_PET_SPELLS)) - { - _resetAllPetSpells(); - } - _LoadTutorials(holder->GetResult(PLAYER_LOGIN_QUERY_LOADTUTORIALS)); // must be before inventory (some items required reputation check) @@ -15775,7 +15769,7 @@ void Player::SaveToDB() ss << uint32(m_stableSlots); // to prevent save uint8 as char ss << ", "; - ss << uint32(m_atLoginFlags); + ss << uint32(m_atLoginFlags & ((1<Fetch(); - uint32 petId = fields[0].GetUInt32(); - uint32 level = fields[1].GetUInt32(); - uint32 entry = fields[2].GetUInt32(); - CreatureInfo const *ci = objmgr.GetCreatureTemplate(entry); - if (!ci) - sLog.outError("Unknown pet (id %d) type saved in character_pet!", petId); - CreatureFamilyEntry const *pet_family = sCreatureFamilyStore.LookupEntry(ci->family); - if (!pet_family) - sLog.outError("Unknown pet (id %d) type saved in character_pet!", petId); - if(pet_family && pet_family->petTalentType >= 0) - { - uint32 points = (level >= 20) ? ((level - 16) / 4) : 0; - CharacterDatabase.PExecute("DELETE FROM pet_spell WHERE guid = '%u'", petId); - std::ostringstream ss; - ss << "UPDATE character_pet SET talentpoints = '"<NextRow() ); - } -} - void Player::learnDefaultSpells() { // learn default race/class spells -- cgit v1.2.3