mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[8183] Some gameobject despanw related fixes
* Implement use `consumable` field in gameobject template for gameobject required explcit despawn at use. * Move gameobject template fields cech function from Gameobject to gameobject template class, and update callers. * Cast spells at gameobject use with gameobject guid as original caster guid, as already used in some other cases.
This commit is contained in:
parent
58209ee79a
commit
9a0abf0e01
8 changed files with 116 additions and 92 deletions
|
|
@ -2983,7 +2983,7 @@ void Spell::EffectOpenLock(uint32 effIndex)
|
|||
return;
|
||||
}
|
||||
}
|
||||
lockId = gameObjTarget->GetLockId();
|
||||
lockId = goInfo->GetLockId();
|
||||
guid = gameObjTarget->GetGUID();
|
||||
}
|
||||
else if(itemTarget)
|
||||
|
|
@ -4627,7 +4627,7 @@ void Spell::EffectSummonObjectWild(uint32 i)
|
|||
}
|
||||
}
|
||||
|
||||
if(uint32 linkedEntry = pGameObj->GetLinkedGameObjectEntry())
|
||||
if(uint32 linkedEntry = pGameObj->GetGOInfo()->GetLinkedGameObjectEntry())
|
||||
{
|
||||
GameObject* linkedGO = new GameObject;
|
||||
if(linkedGO->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), linkedEntry, map,
|
||||
|
|
@ -6341,7 +6341,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
|
|||
data << uint64(pGameObj->GetGUID());
|
||||
m_caster->SendMessageToSet(&data,true);
|
||||
|
||||
if(uint32 linkedEntry = pGameObj->GetLinkedGameObjectEntry())
|
||||
if(uint32 linkedEntry = pGameObj->GetGOInfo()->GetLinkedGameObjectEntry())
|
||||
{
|
||||
GameObject* linkedGO = new GameObject;
|
||||
if(linkedGO->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), linkedEntry, cMap,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue