mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[8789] Rename several singleton macros to use more consistent names.
* objmgr -> sObjectMgr * spellmgr -> sSpellMgr * WaypointMgr -> sWaypointMgr * poolhandler -> sPoolMgr * objaccessor -> sObjectAccessor * mapmgr -> sMapMgr * sInstanceSaveManager -> sInstanceSaveMgr * ticketmgr -> sTicketMgr * CreatureEAI_Mgr -> sEventAIMgr * auctionmgr -> sAuctionMgr * achievementmgr -> sAchievementMgr
This commit is contained in:
parent
539072fcbd
commit
0734adb746
84 changed files with 1113 additions and 1113 deletions
|
|
@ -691,7 +691,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
|
|||
// the reset time is set but not added to the scheduler
|
||||
// until the players leave the instance
|
||||
time_t resettime = cVictim->GetRespawnTimeEx() + 2 * HOUR;
|
||||
if(InstanceSave *save = sInstanceSaveManager.GetInstanceSave(cVictim->GetInstanceId()))
|
||||
if(InstanceSave *save = sInstanceSaveMgr.GetInstanceSave(cVictim->GetInstanceId()))
|
||||
if(save->GetResetTime() < resettime) save->SetResetTime(resettime);
|
||||
}
|
||||
}
|
||||
|
|
@ -3617,7 +3617,7 @@ void Unit::RemoveRankAurasDueToSpell(uint32 spellId)
|
|||
uint32 i_spellId = (*i).second->GetId();
|
||||
if((*i).second && i_spellId && i_spellId != spellId)
|
||||
{
|
||||
if(spellmgr.IsRankSpellDueToSpell(spellInfo,i_spellId))
|
||||
if(sSpellMgr.IsRankSpellDueToSpell(spellInfo,i_spellId))
|
||||
{
|
||||
RemoveAurasDueToSpell(i_spellId);
|
||||
|
||||
|
|
@ -3673,7 +3673,7 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
|
|||
continue;
|
||||
|
||||
// passive non-stackable spells not stackable only with another rank of same spell
|
||||
if (!spellmgr.IsRankSpellDueToSpell(spellProto, i_spellId))
|
||||
if (!sSpellMgr.IsRankSpellDueToSpell(spellProto, i_spellId))
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -3703,7 +3703,7 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
|
|||
if( is_spellSpecPerTarget || is_spellSpecPerTargetPerCaster && Aur->GetCasterGUID() == (*i).second->GetCasterGUID() )
|
||||
{
|
||||
// cannot remove higher rank
|
||||
if (spellmgr.IsRankSpellDueToSpell(spellProto, i_spellId))
|
||||
if (sSpellMgr.IsRankSpellDueToSpell(spellProto, i_spellId))
|
||||
if(CompareAuraRanks(spellId, effIndex, i_spellId, i_effIndex) < 0)
|
||||
return false;
|
||||
|
||||
|
|
@ -3726,7 +3726,7 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
|
|||
// spell with spell specific that allow single ranks for spell from diff caster
|
||||
// same caster case processed or early or later
|
||||
bool is_spellPerTarget = IsSingleFromSpellSpecificSpellRanksPerTarget(spellId_spec,i_spellId_spec);
|
||||
if ( is_spellPerTarget && Aur->GetCasterGUID() != (*i).second->GetCasterGUID() && spellmgr.IsRankSpellDueToSpell(spellProto, i_spellId))
|
||||
if ( is_spellPerTarget && Aur->GetCasterGUID() != (*i).second->GetCasterGUID() && sSpellMgr.IsRankSpellDueToSpell(spellProto, i_spellId))
|
||||
{
|
||||
// cannot remove higher rank
|
||||
if(CompareAuraRanks(spellId, effIndex, i_spellId, i_effIndex) < 0)
|
||||
|
|
@ -3749,7 +3749,7 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
|
|||
}
|
||||
|
||||
// non single (per caster) per target spell specific (possible single spell per target at caster)
|
||||
if( !is_spellSpecPerTargetPerCaster && !is_spellSpecPerTarget && spellmgr.IsNoStackSpellDueToSpell(spellId, i_spellId) )
|
||||
if( !is_spellSpecPerTargetPerCaster && !is_spellSpecPerTarget && sSpellMgr.IsNoStackSpellDueToSpell(spellId, i_spellId) )
|
||||
{
|
||||
// Its a parent aura (create this aura in ApplyModifier)
|
||||
if ((*i).second->IsInUse())
|
||||
|
|
@ -7175,7 +7175,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
|||
{
|
||||
// have rank dependent proc chance, ignore too often cases
|
||||
// PPM = 2.5 * (rank of talent),
|
||||
uint32 rank = spellmgr.GetSpellRank(auraSpellInfo->Id);
|
||||
uint32 rank = sSpellMgr.GetSpellRank(auraSpellInfo->Id);
|
||||
// 5 rank -> 100% 4 rank -> 80% and etc from full rate
|
||||
if(!roll_chance_i(20*rank))
|
||||
return false;
|
||||
|
|
@ -8463,7 +8463,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
|||
SpellModSpellDamage /= 100.0f;
|
||||
|
||||
// Check for table values
|
||||
if (SpellBonusEntry const* bonus = spellmgr.GetSpellBonusData(spellProto->Id))
|
||||
if (SpellBonusEntry const* bonus = sSpellMgr.GetSpellBonusData(spellProto->Id))
|
||||
{
|
||||
float coeff;
|
||||
if (damagetype == DOT)
|
||||
|
|
@ -8911,7 +8911,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
|
|||
SpellModSpellDamage /= 100.0f;
|
||||
|
||||
// Check for table values
|
||||
SpellBonusEntry const* bonus = spellmgr.GetSpellBonusData(spellProto->Id);
|
||||
SpellBonusEntry const* bonus = sSpellMgr.GetSpellBonusData(spellProto->Id);
|
||||
if (bonus)
|
||||
{
|
||||
float coeff;
|
||||
|
|
@ -9377,7 +9377,7 @@ uint32 Unit::MeleeDamageBonus(Unit *pVictim, uint32 pdamage,WeaponAttackType att
|
|||
float LvlPenalty = CalculateLevelPenalty(spellProto);
|
||||
|
||||
// Check for table values
|
||||
if (SpellBonusEntry const* bonus = spellmgr.GetSpellBonusData(spellProto->Id))
|
||||
if (SpellBonusEntry const* bonus = sSpellMgr.GetSpellBonusData(spellProto->Id))
|
||||
{
|
||||
float coeff;
|
||||
if (damagetype == DOT)
|
||||
|
|
@ -11219,14 +11219,14 @@ void CharmInfo::InitCharmCreateSpells()
|
|||
|
||||
bool CharmInfo::AddSpellToActionBar(uint32 spell_id, ActiveStates newstate)
|
||||
{
|
||||
uint32 first_id = spellmgr.GetFirstSpellInChain(spell_id);
|
||||
uint32 first_id = sSpellMgr.GetFirstSpellInChain(spell_id);
|
||||
|
||||
// new spell rank can be already listed
|
||||
for(uint8 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
|
||||
{
|
||||
if (uint32 action = PetActionBar[i].GetAction())
|
||||
{
|
||||
if (PetActionBar[i].IsActionBarForSpell() && spellmgr.GetFirstSpellInChain(action) == first_id)
|
||||
if (PetActionBar[i].IsActionBarForSpell() && sSpellMgr.GetFirstSpellInChain(action) == first_id)
|
||||
{
|
||||
PetActionBar[i].SetAction(spell_id);
|
||||
return true;
|
||||
|
|
@ -11248,13 +11248,13 @@ bool CharmInfo::AddSpellToActionBar(uint32 spell_id, ActiveStates newstate)
|
|||
|
||||
bool CharmInfo::RemoveSpellFromActionBar(uint32 spell_id)
|
||||
{
|
||||
uint32 first_id = spellmgr.GetFirstSpellInChain(spell_id);
|
||||
uint32 first_id = sSpellMgr.GetFirstSpellInChain(spell_id);
|
||||
|
||||
for(uint8 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
|
||||
{
|
||||
if (uint32 action = PetActionBar[i].GetAction())
|
||||
{
|
||||
if (PetActionBar[i].IsActionBarForSpell() && spellmgr.GetFirstSpellInChain(action) == first_id)
|
||||
if (PetActionBar[i].IsActionBarForSpell() && sSpellMgr.GetFirstSpellInChain(action) == first_id)
|
||||
{
|
||||
SetActionBar(i,0,ACT_DISABLED);
|
||||
return true;
|
||||
|
|
@ -11981,7 +11981,7 @@ void Unit::ClearComboPointHolders()
|
|||
{
|
||||
uint32 lowguid = *m_ComboPointHolders.begin();
|
||||
|
||||
Player* plr = objmgr.GetPlayer(MAKE_NEW_GUID(lowguid, 0, HIGHGUID_PLAYER));
|
||||
Player* plr = sObjectMgr.GetPlayer(MAKE_NEW_GUID(lowguid, 0, HIGHGUID_PLAYER));
|
||||
if(plr && plr->GetComboTarget()==GetGUID()) // recheck for safe
|
||||
plr->ClearComboPoints(); // remove also guid from m_ComboPointHolders;
|
||||
else
|
||||
|
|
@ -12341,7 +12341,7 @@ Pet* Unit::CreateTamedPetFrom(Creature* creatureTarget,uint32 spell_id)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
pet->GetCharmInfo()->SetPetNumber(objmgr.GeneratePetNumber(), true);
|
||||
pet->GetCharmInfo()->SetPetNumber(sObjectMgr.GeneratePetNumber(), true);
|
||||
// this enables pet details window (Shift+P)
|
||||
pet->AIM_Initialize();
|
||||
pet->InitPetCreateSpells();
|
||||
|
|
@ -12357,7 +12357,7 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura* aura, SpellEntry con
|
|||
SpellEntry const* spellProto = aura->GetSpellProto ();
|
||||
|
||||
// Get proc Event Entry
|
||||
spellProcEvent = spellmgr.GetSpellProcEvent(spellProto->Id);
|
||||
spellProcEvent = sSpellMgr.GetSpellProcEvent(spellProto->Id);
|
||||
|
||||
// Aura info stored here
|
||||
Modifier *mod = aura->GetModifier();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue