diff --git a/src/bindings/universal/ScriptMgr.cpp b/src/bindings/universal/ScriptMgr.cpp index 0d1c5f535..1b522935b 100644 --- a/src/bindings/universal/ScriptMgr.cpp +++ b/src/bindings/universal/ScriptMgr.cpp @@ -289,14 +289,14 @@ bool AreaTrigger ( Player *player, AreaTriggerEntry* atEntry ) } MANGOS_DLL_EXPORT -bool ProcessEventId(uint32 eventId, Object* source, Object* target, bool data) +bool ProcessEventId(uint32 eventId, Object* source, Object* target, bool isStart) { Script *tmpscript = m_scripts[GetEventIdScriptId(eventId)]; if (!tmpscript || !tmpscript->pProcessEventId) return false; - // data normally false, true for taxi event id where it's a departure - return tmpscript->pProcessEventId(eventId, source, target, data); + // isStart are normally true. For taxi event id at arrival, it's false + return tmpscript->pProcessEventId(eventId, source, target, isStart); } MANGOS_DLL_EXPORT diff --git a/src/bindings/universal/ScriptMgr.h b/src/bindings/universal/ScriptMgr.h index cc3cdd816..a0632d6cc 100644 --- a/src/bindings/universal/ScriptMgr.h +++ b/src/bindings/universal/ScriptMgr.h @@ -65,7 +65,7 @@ struct Script bool (*pItemHello )(Player *player, Item *_Item, Quest const*_Quest ); bool (*pGOHello )(Player *player, GameObject *_GO ); bool (*pAreaTrigger )(Player *player, AreaTriggerEntry* at); - bool (*pProcessEventId )(uint32 eventId, Object* source, Object* target, bool data); + bool (*pProcessEventId )(uint32 eventId, Object* source, Object* target, bool isStart); bool (*pItemQuestAccept )(Player *player, Item *_Item, Quest const*_Quest ); bool (*pGOQuestAccept )(Player *player, GameObject *_GO, Quest const*_Quest ); bool (*pGOChooseReward )(Player *player, GameObject *_GO, Quest const*_Quest, uint32 opt ); diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index 654035d7a..c05e9639f 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -913,7 +913,7 @@ void GameObject::Use(Unit* user) { DEBUG_LOG("Chest ScriptStart id %u for GO %u", GetGOInfo()->chest.eventId, GetDBTableGUIDLow()); - if (!Script->ProcessEventId(GetGOInfo()->chest.eventId, user, this, false)) + if (!Script->ProcessEventId(GetGOInfo()->chest.eventId, user, this, true)) GetMap()->ScriptsStart(sEventScripts, GetGOInfo()->chest.eventId, user, this); } @@ -1019,7 +1019,7 @@ void GameObject::Use(Unit* user) { DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Goober ScriptStart id %u for GO entry %u (GUID %u).", info->goober.eventId, GetEntry(), GetDBTableGUIDLow()); - if (!Script->ProcessEventId(info->goober.eventId, player, this, false)) + if (!Script->ProcessEventId(info->goober.eventId, player, this, true)) GetMap()->ScriptsStart(sEventScripts, info->goober.eventId, player, this); } @@ -1082,7 +1082,7 @@ void GameObject::Use(Unit* user) if (info->camera.eventID) { - if (!Script->ProcessEventId(info->camera.eventID, player, this, false)) + if (!Script->ProcessEventId(info->camera.eventID, player, this, true)) GetMap()->ScriptsStart(sEventScripts, info->camera.eventID, player, this); } diff --git a/src/game/ScriptCalls.h b/src/game/ScriptCalls.h index 5b7977403..6bd7c74ad 100644 --- a/src/game/ScriptCalls.h +++ b/src/game/ScriptCalls.h @@ -55,7 +55,7 @@ typedef bool(MANGOS_IMPORT * scriptCallChooseReward)( Player *player, Creature * typedef bool(MANGOS_IMPORT * scriptCallItemHello)( Player *player, Item *, Quest const*); typedef bool(MANGOS_IMPORT * scriptCallGOHello)( Player *player, GameObject * ); typedef bool(MANGOS_IMPORT * scriptCallAreaTrigger)( Player *player, AreaTriggerEntry const* ); -typedef bool(MANGOS_IMPORT * scriptCallProcessEventId)(uint32 eventId, Object* source, Object* target, bool data); +typedef bool(MANGOS_IMPORT * scriptCallProcessEventId)(uint32 eventId, Object* source, Object* target, bool isStart); typedef bool(MANGOS_IMPORT * scriptCallItemQuestAccept)(Player *player, Item *, Quest const*); typedef bool(MANGOS_IMPORT * scriptCallGOQuestAccept)(Player *player, GameObject *, Quest const*); typedef bool(MANGOS_IMPORT * scriptCallGOChooseReward)(Player *player, GameObject *, Quest const*, uint32 opt ); diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 2b6795928..d8377e24e 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3097,7 +3097,7 @@ void Spell::EffectSendEvent(SpellEffectIndex effectIndex) */ DEBUG_FILTER_LOG(LOG_FILTER_SPELL_CAST, "Spell ScriptStart %u for spellid %u in EffectSendEvent ", m_spellInfo->EffectMiscValue[effectIndex], m_spellInfo->Id); - if (!Script->ProcessEventId(m_spellInfo->EffectMiscValue[effectIndex], m_caster, focusObject, false)) + if (!Script->ProcessEventId(m_spellInfo->EffectMiscValue[effectIndex], m_caster, focusObject, true)) m_caster->GetMap()->ScriptsStart(sEventScripts, m_spellInfo->EffectMiscValue[effectIndex], m_caster, focusObject); } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index bc9e452e2..848c31fae 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10302" + #define REVISION_NR "10303" #endif // __REVISION_NR_H__