diff options
| author | Gyx <2359980687@qq.com> | 2012-03-16 20:31:23 +0800 |
|---|---|---|
| committer | Gyx <2359980687@qq.com> | 2012-03-16 20:31:23 +0800 |
| commit | cd38e7df2ba09b20f1ea8d778e9b6fe1e0365740 (patch) | |
| tree | 49e1989a0aef2a669405f2179d7291d9c1227fbe /src/server/scripts/EasternKingdoms/ZulAman | |
| parent | bef1b0c4028a3986d63c3b2c9ebdf532a3c73b5b (diff) | |
Core/Script: Code style.
Signed-off-by: Gyx <2359980687@qq.com>
Diffstat (limited to 'src/server/scripts/EasternKingdoms/ZulAman')
| -rw-r--r-- | src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp | 3 | ||||
| -rw-r--r-- | src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp | 21 |
2 files changed, 16 insertions, 8 deletions
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp index bbaafa63979..f2e6647dc59 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp @@ -221,7 +221,8 @@ class boss_janalai : public CreatureScript dy = float(irand(-area_dy/2, area_dy/2)); Creature* bomb = DoSpawnCreature(MOB_FIRE_BOMB, dx, dy, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 15000); - if (bomb) FireBombGUIDs[i] = bomb->GetGUID(); + if (bomb) + FireBombGUIDs[i] = bomb->GetGUID(); } BombCount = 0; } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index a78ec29be99..35b9781ea45 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -120,24 +120,29 @@ static uint32 ChestEntry[] = {186648, 187021, 186672, 186667}; class npc_zulaman_hostage : public CreatureScript { public: - - npc_zulaman_hostage() - : CreatureScript("npc_zulaman_hostage") - { - } + npc_zulaman_hostage() : CreatureScript("npc_zulaman_hostage") { } struct npc_zulaman_hostageAI : public ScriptedAI { - npc_zulaman_hostageAI(Creature* creature) : ScriptedAI(creature) {IsLoot = false;} + npc_zulaman_hostageAI(Creature* creature) : ScriptedAI(creature) + { + IsLoot = false; + } + bool IsLoot; uint64 PlayerGUID; + void Reset() {} + void EnterCombat(Unit* /*who*/) {} + void JustDied(Unit* /*who*/) { Player* player = Unit::GetPlayer(*me, PlayerGUID); - if (player) player->SendLoot(me->GetGUID(), LOOT_CORPSE); + if (player) + player->SendLoot(me->GetGUID(), LOOT_CORPSE); } + void UpdateAI(const uint32 /*diff*/) { if (IsLoot) @@ -160,11 +165,13 @@ class npc_zulaman_hostage : public CreatureScript bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) { player->PlayerTalkClass->ClearMenus(); + if (action == GOSSIP_ACTION_INFO_DEF + 1) player->CLOSE_GOSSIP_MENU(); if (!creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP)) return true; + creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); InstanceScript* instance = creature->GetInstanceScript(); |
