diff options
| author | megamage <none@none> | 2009-08-20 22:52:49 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-08-20 22:52:49 -0500 |
| commit | 8efb1c3e4e08506d67931323b0592a39552af566 (patch) | |
| tree | 576480f28578545164405c9f3d18467c9ce2c386 /src/bindings/scripts | |
| parent | 6e7e5ebf7015558aed69866940e9f7ef9166815a (diff) | |
*Display worldstate in wintergrasp.
--HG--
branch : trunk
Diffstat (limited to 'src/bindings/scripts')
| -rw-r--r-- | src/bindings/scripts/scripts/northrend/wintergrasp.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/bindings/scripts/scripts/northrend/wintergrasp.cpp b/src/bindings/scripts/scripts/northrend/wintergrasp.cpp index 133138630b0..caa1232bb27 100644 --- a/src/bindings/scripts/scripts/northrend/wintergrasp.cpp +++ b/src/bindings/scripts/scripts/northrend/wintergrasp.cpp @@ -62,14 +62,17 @@ bool GossipHello_npc_demolisher_engineerer(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_demolisher_engineerer(Player* pPlayer, Creature* me, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_demolisher_engineerer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { pPlayer->CLOSE_GOSSIP_MENU(); - switch(uiAction - GOSSIP_ACTION_INFO_DEF) + if(pPlayer->isGameMaster() || pCreature->GetZoneScript() && pCreature->GetZoneScript()->GetData(pCreature->GetDBTableGUIDLow())) { - case 0: pPlayer->CastSpell(pPlayer, 56663, false, NULL, NULL, me->GetGUID()); break; - case 1: pPlayer->CastSpell(pPlayer, 56575, false, NULL, NULL, me->GetGUID()); break; - case 2: pPlayer->CastSpell(pPlayer, pPlayer->GetTeamId() ? 61408 : 56661, false, NULL, NULL, me->GetGUID()); break; + switch(uiAction - GOSSIP_ACTION_INFO_DEF) + { + case 0: pPlayer->CastSpell(pPlayer, 56663, false, NULL, NULL, pCreature->GetGUID()); break; + case 1: pPlayer->CastSpell(pPlayer, 56575, false, NULL, NULL, pCreature->GetGUID()); break; + case 2: pPlayer->CastSpell(pPlayer, pPlayer->GetTeamId() ? 61408 : 56661, false, NULL, NULL, pCreature->GetGUID()); break; + } } return true; @@ -85,4 +88,4 @@ void AddSC_wintergrasp() newscript->pGossipHello = &GossipHello_npc_demolisher_engineerer; newscript->pGossipSelect = &GossipSelect_npc_demolisher_engineerer; newscript->RegisterSelf(); -}
\ No newline at end of file +} |
