aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTrazom62 <none@none>2010-04-11 23:49:00 +0200
committerTrazom62 <none@none>2010-04-11 23:49:00 +0200
commitd9367da5f222ad694944e8bfdb549901e4556cf6 (patch)
tree6ed4ca7118747d450705e9a0b3ce9a106a509247 /src
parente2ed15655b9490f64085f72d993814da9de7f427 (diff)
Fix script started twice for Gobber (GO type=10) with eventID.
Fixes issue #1589. With help of Az@zel, thanks. --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/GameObject.cpp7
-rw-r--r--src/game/SpellEffects.cpp7
2 files changed, 3 insertions, 11 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index 1f3932c4f0f..53b0dc5812a 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -1137,6 +1137,7 @@ void GameObject::Use(Unit* user)
{
sLog.outDebug("Goober ScriptStart id %u for GO entry %u (GUID %u).", info->goober.eventId, GetEntry(), GetDBTableGUIDLow());
GetMap()->ScriptsStart(sEventScripts, info->goober.eventId, player, this);
+ EventInform(info->goober.eventId);
}
// possible quest objective for active quests
@@ -1147,10 +1148,8 @@ void GameObject::Use(Unit* user)
break;
}
- if (BattleGround* bg = player->GetBattleGround())
- {
- bg->EventPlayerUsedGO(player, this);
- }
+ if (BattleGround* bg = player->GetBattleGround())
+ bg->EventPlayerUsedGO(player, this);
player->CastedCreatureOrGO(info->id, GetGUID(), 0);
}
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 6c64163ac0d..73a62eae53b 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -3346,13 +3346,6 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
return;
case GAMEOBJECT_TYPE_GOOBER:
- // goober_scripts can be triggered if the player don't have the quest
- if (gameObjTarget->GetGOInfo()->goober.eventId)
- {
- sLog.outDebug("Goober ScriptStart id %u for GO %u",gameObjTarget->GetGOInfo()->goober.eventId,gameObjTarget->GetDBTableGUIDLow());
- player->GetMap()->ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->goober.eventId, player, gameObjTarget);
- gameObjTarget->EventInform(gameObjTarget->GetGOInfo()->goober.eventId);
- }
gameObjTarget->Use(m_caster);
return;