mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[8252] Move DB scripting code from global World to Map.
This one more step to pre-map events proccesing and parallel in future. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
7ac4dc6f13
commit
64f11bedf7
8 changed files with 757 additions and 741 deletions
|
|
@ -2466,7 +2466,7 @@ void Spell::EffectSendEvent(uint32 EffectIndex)
|
|||
we do not handle a flag dropping or clicking on flag in battleground by sendevent system
|
||||
*/
|
||||
sLog.outDebug("Spell ScriptStart %u for spellid %u in EffectSendEvent ", m_spellInfo->EffectMiscValue[EffectIndex], m_spellInfo->Id);
|
||||
sWorld.ScriptsStart(sEventScripts, m_spellInfo->EffectMiscValue[EffectIndex], m_caster, focusObject);
|
||||
m_caster->GetMap()->ScriptsStart(sEventScripts, m_spellInfo->EffectMiscValue[EffectIndex], m_caster, focusObject);
|
||||
}
|
||||
|
||||
void Spell::EffectPowerBurn(uint32 i)
|
||||
|
|
@ -2969,7 +2969,7 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
|
|||
case GAMEOBJECT_TYPE_DOOR:
|
||||
case GAMEOBJECT_TYPE_BUTTON:
|
||||
gameObjTarget->UseDoorOrButton();
|
||||
sWorld.ScriptsStart(sGameObjectScripts, gameObjTarget->GetDBTableGUIDLow(), player, gameObjTarget);
|
||||
player->GetMap()->ScriptsStart(sGameObjectScripts, gameObjTarget->GetDBTableGUIDLow(), player, gameObjTarget);
|
||||
return;
|
||||
|
||||
case GAMEOBJECT_TYPE_QUESTGIVER:
|
||||
|
|
@ -2989,7 +2989,7 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
|
|||
if (gameObjTarget->GetGOInfo()->goober.eventId)
|
||||
{
|
||||
sLog.outDebug("Goober ScriptStart id %u for GO %u", gameObjTarget->GetGOInfo()->goober.eventId,gameObjTarget->GetDBTableGUIDLow());
|
||||
sWorld.ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->goober.eventId, player, gameObjTarget);
|
||||
player->GetMap()->ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->goober.eventId, player, gameObjTarget);
|
||||
}
|
||||
|
||||
// cast goober spell
|
||||
|
|
@ -3018,7 +3018,7 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
|
|||
if (gameObjTarget->GetGOInfo()->chest.eventId)
|
||||
{
|
||||
sLog.outDebug("Chest ScriptStart id %u for GO %u", gameObjTarget->GetGOInfo()->chest.eventId,gameObjTarget->GetDBTableGUIDLow());
|
||||
sWorld.ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->chest.eventId, player, gameObjTarget);
|
||||
player->GetMap()->ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->chest.eventId, player, gameObjTarget);
|
||||
}
|
||||
|
||||
// triggering linked GO
|
||||
|
|
@ -5316,7 +5316,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
|||
return;
|
||||
|
||||
sLog.outDebug("Spell ScriptStart spellid %u in EffectScriptEffect ", m_spellInfo->Id);
|
||||
sWorld.ScriptsStart(sSpellScripts, m_spellInfo->Id, m_caster, unitTarget);
|
||||
m_caster->GetMap()->ScriptsStart(sSpellScripts, m_spellInfo->Id, m_caster, unitTarget);
|
||||
}
|
||||
|
||||
void Spell::EffectSanctuary(uint32 /*i*/)
|
||||
|
|
@ -5500,7 +5500,7 @@ void Spell::EffectActivateObject(uint32 effect_idx)
|
|||
|
||||
int32 delay_secs = m_spellInfo->EffectMiscValue[effect_idx];
|
||||
|
||||
sWorld.ScriptCommandStart(activateCommand, delay_secs, m_caster, gameObjTarget);
|
||||
gameObjTarget->GetMap()->ScriptCommandStart(activateCommand, delay_secs, m_caster, gameObjTarget);
|
||||
}
|
||||
|
||||
void Spell::EffectApplyGlyph(uint32 i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue