mirror of
https://github.com/mangosfour/server.git
synced 2025-12-24 19:37:07 +00:00
[10509] Fix some "foo initialized after bar" gcc warnings and remove some unused variables.
This commit is contained in:
parent
8ccf9c7464
commit
47397ff19b
10 changed files with 28 additions and 35 deletions
|
|
@ -37,8 +37,10 @@ char const* petTypeSuffix[MAX_PET_TYPE] =
|
|||
};
|
||||
|
||||
Pet::Pet(PetType type) :
|
||||
Creature(CREATURE_SUBTYPE_PET), m_removed(false), m_petType(type), m_happinessTimer(7500), m_duration(0), m_resetTalentsCost(0),
|
||||
m_bonusdamage(0), m_resetTalentsTime(0), m_usedTalentCount(0), m_auraUpdateMask(0), m_loading(false),
|
||||
Creature(CREATURE_SUBTYPE_PET),
|
||||
m_resetTalentsCost(0), m_resetTalentsTime(0), m_usedTalentCount(0),
|
||||
m_removed(false), m_happinessTimer(7500), m_petType(type), m_duration(0),
|
||||
m_bonusdamage(0), m_auraUpdateMask(0), m_loading(false),
|
||||
m_declinedname(NULL), m_petModeFlags(PET_MODE_DEFAULT)
|
||||
{
|
||||
m_name = "Pet";
|
||||
|
|
@ -1142,7 +1144,7 @@ void Pet::_SaveSpells()
|
|||
void Pet::_LoadAuras(uint32 timediff)
|
||||
{
|
||||
RemoveAllAuras();
|
||||
|
||||
|
||||
QueryResult *result = CharacterDatabase.PQuery("SELECT caster_guid,item_guid,spell,stackcount,remaincharges,basepoints0,basepoints1,basepoints2,maxduration0,maxduration1,maxduration2,remaintime0,remaintime1,remaintime2,effIndexMask FROM pet_aura WHERE guid = '%u'",m_charmInfo->GetPetNumber());
|
||||
|
||||
if(result)
|
||||
|
|
@ -1210,7 +1212,7 @@ void Pet::_LoadAuras(uint32 timediff)
|
|||
aura->SetLoadedState(damage[i], maxduration[i], remaintime[i]);
|
||||
holder->AddAura(aura, SpellEffectIndex(i));
|
||||
}
|
||||
|
||||
|
||||
if (!holder->IsEmptyHolder())
|
||||
{
|
||||
holder->SetLoadedState(caster_guid, ObjectGuid(HIGHGUID_ITEM, item_lowguid), stackcount, remaincharges);
|
||||
|
|
@ -1586,9 +1588,6 @@ bool Pet::resetTalents(bool no_cost)
|
|||
|
||||
Player *player = (Player *)owner;
|
||||
|
||||
uint32 level = getLevel();
|
||||
uint32 talentPointsForLevel = GetMaxTalentPointsForLevel(level);
|
||||
|
||||
if (m_usedTalentCount == 0)
|
||||
{
|
||||
UpdateFreeTalentPoints(false); // for fix if need counter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue