[8252] Move DB scripting code from global World to Map. Author: Ambal

This one more step to pre-map events proccesing and parallel in future.

    [8256] Restore DB script loading broken after [8252]. Author: VladimirMangos

    Also propetly decrease scheduled DB script actions at map unloading.
    Some code style restore.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-07-31 10:48:34 +08:00
parent b1bd5e7905
commit 0a2af88cb4
10 changed files with 921 additions and 892 deletions
+2 -2
View File
@@ -12882,7 +12882,7 @@ void Player::AddQuest( Quest const *pQuest, Object *questGiver )
//starting initial quest script
if(questGiver && pQuest->GetQuestStartScript()!=0)
sWorld.ScriptsStart(sQuestStartScripts, pQuest->GetQuestStartScript(), questGiver, this);
GetMap()->ScriptsStart(sQuestStartScripts, pQuest->GetQuestStartScript(), questGiver, this);
// Some spells applied at quest activation
SpellAreaForQuestMapBounds saBounds = spellmgr.GetSpellAreaForQuestMapBounds(quest_id,true);
@@ -14142,7 +14142,7 @@ void Player::SendQuestReward( Quest const *pQuest, uint32 XP, Object * questGive
GetSession()->SendPacket( &data );
if (pQuest->GetQuestCompleteScript() != 0)
sWorld.ScriptsStart(sQuestEndScripts, pQuest->GetQuestCompleteScript(), questGiver, this);
GetMap()->ScriptsStart(sQuestEndScripts, pQuest->GetQuestCompleteScript(), questGiver, this);
}
void Player::SendQuestFailed( uint32 quest_id )