diff options
| author | Shauren <none@none> | 2010-12-23 23:25:44 +0100 |
|---|---|---|
| committer | Shauren <none@none> | 2010-12-23 23:25:44 +0100 |
| commit | 928443d8993869dfbf3adceabe4ba0b3cfe0edef (patch) | |
| tree | b30f1385e6f2dd8d95357590593aa2988b094593 /src/server/game/Entities/Pet | |
| parent | 95daf7998fc3b772fdcd70087c12db80bd5a031a (diff) | |
Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Entities/Pet')
| -rwxr-xr-x | src/server/game/Entities/Pet/Pet.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index aafe705f284..688893889bb 100755 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -73,7 +73,7 @@ void Pet::AddToWorld() if (!IsInWorld()) { ///- Register the pet for guid lookup - sObjectAccessor.AddObject(this); + sObjectAccessor->AddObject(this); Unit::AddToWorld(); AIM_Initialize(); } @@ -97,7 +97,7 @@ void Pet::RemoveFromWorld() { ///- Don't call the function for Creature, normal mobs + totems go in a different storage Unit::RemoveFromWorld(); - sObjectAccessor.RemoveObject(this); + sObjectAccessor->RemoveObject(this); } } @@ -178,7 +178,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c if (!IsPositionValid()) { - sLog.outError("Pet (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)", + sLog->outError("Pet (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)", GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY()); return false; } @@ -224,7 +224,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c break; default: if (!IsPetGhoul()) - sLog.outError("Pet have incorrect type (%u) for pet loading.", getPetType()); + sLog->outError("Pet have incorrect type (%u) for pet loading.", getPetType()); break; } @@ -308,7 +308,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c CleanupActionBar(); // remove unknown spells from action bar after load - sLog.outDebug("New Pet has guid %u", GetGUIDLow()); + sLog->outDebug("New Pet has guid %u", GetGUIDLow()); owner->PetSpellInitialize(); @@ -518,7 +518,7 @@ void Pet::Update(uint32 diff) { if (owner->GetPetGUID() != GetGUID()) { - sLog.outError("Pet %u is not pet of owner %s, removed", GetEntry(), m_owner->GetName()); + sLog->outError("Pet %u is not pet of owner %s, removed", GetEntry(), m_owner->GetName()); Remove(getPetType() == HUNTER_PET?PET_SAVE_AS_DELETED:PET_SAVE_NOT_IN_SLOT); return; } @@ -596,7 +596,7 @@ void Creature::Regenerate(Powers power) case POWER_FOCUS: { // For hunter pets. - addvalue = 24 * sWorld.getRate(RATE_POWER_FOCUS); + addvalue = 24 * sWorld->getRate(RATE_POWER_FOCUS); break; } case POWER_ENERGY: @@ -696,7 +696,7 @@ void Pet::GivePetXP(uint32 xp) if (!isAlive()) return; - uint8 maxlevel = std::min((uint8)sWorld.getIntConfig(CONFIG_MAX_PLAYER_LEVEL), GetOwner()->getLevel()); + uint8 maxlevel = std::min((uint8)sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL), GetOwner()->getLevel()); uint8 petlevel = getLevel(); // If pet is detected to be at, or above(?) the players level, don't hand out XP @@ -749,7 +749,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature) if (!IsPositionValid()) { - sLog.outError("Pet (guidlow %d, entry %d) not created base at creature. Suggested coordinates isn't valid (X: %f Y: %f)", + sLog->outError("Pet (guidlow %d, entry %d) not created base at creature. Suggested coordinates isn't valid (X: %f Y: %f)", GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY()); return false; } @@ -757,14 +757,14 @@ bool Pet::CreateBaseAtCreature(Creature* creature) CreatureInfo const *cinfo = GetCreatureInfo(); if (!cinfo) { - sLog.outError("CreateBaseAtCreature() failed, creatureInfo is missing!"); + sLog->outError("CreateBaseAtCreature() failed, creatureInfo is missing!"); return false; } SetDisplayId(creature->GetDisplayId()); if (CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family)) - SetName(cFamily->Name[sWorld.GetDefaultDbcLocale()]); + SetName(cFamily->Name[sWorld->GetDefaultDbcLocale()]); else SetName(creature->GetNameForLocaleIdx(sObjectMgr->GetDBCLocaleIndex())); @@ -777,7 +777,7 @@ bool Pet::CreateBaseAtCreatureInfo(CreatureInfo const* cinfo, Unit * owner) return false; if (CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family)) - SetName(cFamily->Name[sWorld.GetDefaultDbcLocale()]); + SetName(cFamily->Name[sWorld->GetDefaultDbcLocale()]); Relocate(owner->GetPositionX(), owner->GetPositionY(), owner->GetPositionZ(), owner->GetOrientation()); @@ -786,7 +786,7 @@ bool Pet::CreateBaseAtCreatureInfo(CreatureInfo const* cinfo, Unit * owner) bool Pet::CreateBaseAtTamed(CreatureInfo const * cinfo, Map * map, uint32 phaseMask) { - sLog.outDebug("Pet::CreateBaseForTamed"); + sLog->outDebug("Pet::CreateBaseForTamed"); uint32 guid=sObjectMgr->GenerateLowGuid(HIGHGUID_PET); uint32 pet_number = sObjectMgr->GeneratePetNumber(); if (!Create(guid, map, phaseMask, cinfo->Entry, pet_number)) @@ -832,7 +832,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) m_unitTypeMask |= UNIT_MASK_HUNTER_PET; } else - sLog.outError("Unknown type pet %u is summoned by player class %u", GetEntry(), m_owner->getClass()); + sLog->outError("Unknown type pet %u is summoned by player class %u", GetEntry(), m_owner->getClass()); } uint32 creature_ID = (petType == HUNTER_PET) ? 1 : cinfo->Entry; @@ -1112,7 +1112,7 @@ void Pet::_LoadSpellCooldowns() if (!sSpellStore.LookupEntry(spell_id)) { - sLog.outError("Pet %u have unknown spell %u in `pet_spell_cooldown`, skipping.",m_charmInfo->GetPetNumber(),spell_id); + sLog->outError("Pet %u have unknown spell %u in `pet_spell_cooldown`, skipping.",m_charmInfo->GetPetNumber(),spell_id); continue; } @@ -1125,7 +1125,7 @@ void Pet::_LoadSpellCooldowns() _AddCreatureSpellCooldown(spell_id,db_time); - sLog.outDebug("Pet (Number: %u) spell %u cooldown loaded (%u secs).", m_charmInfo->GetPetNumber(), spell_id, uint32(db_time-curTime)); + sLog->outDebug("Pet (Number: %u) spell %u cooldown loaded (%u secs).", m_charmInfo->GetPetNumber(), spell_id, uint32(db_time-curTime)); } while (result->NextRow()); @@ -1201,7 +1201,7 @@ void Pet::_SaveSpells(SQLTransaction& trans) void Pet::_LoadAuras(uint32 timediff) { - sLog.outDebug("Loading auras for pet %u",GetGUIDLow()); + sLog->outDebug("Loading auras for pet %u",GetGUIDLow()); QueryResult result = CharacterDatabase.PQuery("SELECT caster_guid,spell,effect_mask,recalculate_mask,stackcount,amount0,amount1,amount2,base_amount0,base_amount1,base_amount2,maxduration,remaintime,remaincharges FROM pet_aura WHERE guid = '%u'",m_charmInfo->GetPetNumber()); @@ -1230,7 +1230,7 @@ void Pet::_LoadAuras(uint32 timediff) SpellEntry const* spellproto = sSpellStore.LookupEntry(spellid); if (!spellproto) { - sLog.outError("Unknown aura (spellid %u), ignore.",spellid); + sLog->outError("Unknown aura (spellid %u), ignore.",spellid); continue; } @@ -1261,7 +1261,7 @@ void Pet::_LoadAuras(uint32 timediff) } aura->SetLoadedState(maxduration,remaintime,remaincharges,stackcount,recalculatemask,&damage[0]); aura->ApplyForTargets(); - sLog.outDetail("Added aura spellid %u, effectmask %u", spellproto->Id, effmask); + sLog->outDetail("Added aura spellid %u, effectmask %u", spellproto->Id, effmask); } } while (result->NextRow()); @@ -1317,11 +1317,11 @@ bool Pet::addSpell(uint32 spell_id,ActiveStates active /*= ACT_DECIDE*/, PetSpel // do pet spell book cleanup if (state == PETSPELL_UNCHANGED) // spell load case { - sLog.outError("Pet::addSpell: Non-existed in SpellStore spell #%u request, deleting for all pets in `pet_spell`.",spell_id); + sLog->outError("Pet::addSpell: Non-existed in SpellStore spell #%u request, deleting for all pets in `pet_spell`.",spell_id); CharacterDatabase.PExecute("DELETE FROM pet_spell WHERE spell = '%u'",spell_id); } else - sLog.outError("Pet::addSpell: Non-existed in SpellStore spell #%u request.",spell_id); + sLog->outError("Pet::addSpell: Non-existed in SpellStore spell #%u request.",spell_id); return false; } @@ -1770,7 +1770,7 @@ void Pet::InitTalentForLevel() uint32 Pet::resetTalentsCost() const { - int64 days = int64(sWorld.GetGameTime() - m_resetTalentsTime)/DAY; + int64 days = int64(sWorld->GetGameTime() - m_resetTalentsTime)/DAY; // The first time reset costs 10 silver; after 1 day cost is reset to 10 silver if (m_resetTalentsCost < 10*SILVER || days > 0) |
