mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
[8718] Remove most GetObjectInWorld functions and move some map local to Map
Also mape pet guid counter per-map (in different expecte to be global pet number)
This commit is contained in:
parent
40b0a2cd92
commit
d7ae5e3af0
20 changed files with 135 additions and 132 deletions
|
|
@ -3386,7 +3386,7 @@ void Spell::EffectSummon(uint32 i)
|
|||
|
||||
Map *map = m_caster->GetMap();
|
||||
uint32 pet_number = objmgr.GeneratePetNumber();
|
||||
if (!spawnCreature->Create(objmgr.GenerateLowGuid(HIGHGUID_PET), map, m_caster->GetPhaseMask(),
|
||||
if (!spawnCreature->Create(map->GenerateLocalLowGuid(HIGHGUID_PET), map, m_caster->GetPhaseMask(),
|
||||
m_spellInfo->EffectMiscValue[i], pet_number))
|
||||
{
|
||||
sLog.outErrorDb("Spell::EffectSummon: no such creature entry %u",m_spellInfo->EffectMiscValue[i]);
|
||||
|
|
@ -3801,7 +3801,7 @@ void Spell::EffectSummonGuardian(uint32 i)
|
|||
|
||||
Map *map = m_caster->GetMap();
|
||||
uint32 pet_number = objmgr.GeneratePetNumber();
|
||||
if (!spawnCreature->Create(objmgr.GenerateLowGuid(HIGHGUID_PET), map,m_caster->GetPhaseMask(),
|
||||
if (!spawnCreature->Create(map->GenerateLocalLowGuid(HIGHGUID_PET), map,m_caster->GetPhaseMask(),
|
||||
m_spellInfo->EffectMiscValue[i], pet_number))
|
||||
{
|
||||
sLog.outError("no such creature entry %u", m_spellInfo->EffectMiscValue[i]);
|
||||
|
|
@ -4270,7 +4270,7 @@ void Spell::EffectSummonPet(uint32 i)
|
|||
|
||||
Map *map = m_caster->GetMap();
|
||||
uint32 pet_number = objmgr.GeneratePetNumber();
|
||||
if(!NewSummon->Create(objmgr.GenerateLowGuid(HIGHGUID_PET), map, m_caster->GetPhaseMask(),
|
||||
if(!NewSummon->Create(map->GenerateLocalLowGuid(HIGHGUID_PET), map, m_caster->GetPhaseMask(),
|
||||
petentry, pet_number))
|
||||
{
|
||||
delete NewSummon;
|
||||
|
|
@ -6291,7 +6291,7 @@ void Spell::EffectSummonCritter(uint32 i)
|
|||
|
||||
Map *map = m_caster->GetMap();
|
||||
uint32 pet_number = objmgr.GeneratePetNumber();
|
||||
if(!critter->Create(objmgr.GenerateLowGuid(HIGHGUID_PET), map, m_caster->GetPhaseMask(),
|
||||
if(!critter->Create(map->GenerateLocalLowGuid(HIGHGUID_PET), map, m_caster->GetPhaseMask(),
|
||||
pet_entry, pet_number))
|
||||
{
|
||||
sLog.outError("Spell::EffectSummonCritter, spellid %u: no such creature entry %u", m_spellInfo->Id, pet_entry);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue