@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user