mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 22:26:22 +00:00
fix(Core/Dungeon): Remove Goblin Rocket Pack from inventory in ICC Gunship Battle (#2191)
Part 2
This commit is contained in:
@@ -168,7 +168,6 @@ enum Spells
|
||||
|
||||
enum MiscData
|
||||
{
|
||||
ITEM_GOBLIN_ROCKET_PACK = 49278,
|
||||
MUSIC_ENCOUNTER = 17289
|
||||
};
|
||||
|
||||
@@ -646,13 +645,6 @@ class npc_gunship : public CreatureScript
|
||||
c->DespawnOrUnsummon(1);
|
||||
}
|
||||
}
|
||||
|
||||
// Destory Goblin Rocket Pack
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
if (!PlayerList.isEmpty())
|
||||
for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
|
||||
if (Player* pPlr = itr->GetSource())
|
||||
pPlr->DestroyItemCount(49278, 1, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -562,6 +562,11 @@ enum AreaIds
|
||||
AREA_THE_FROZEN_THRONE = 4859,
|
||||
};
|
||||
|
||||
enum ItemIds
|
||||
{
|
||||
ITEM_GOBLIN_ROCKET_PACK = 49278
|
||||
};
|
||||
|
||||
class spell_trigger_spell_from_caster : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -1027,6 +1027,13 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
if (theLichKing->IsAlive())
|
||||
theLichKing->SetVisible(false);
|
||||
}
|
||||
|
||||
void RemoveBackPack()
|
||||
{
|
||||
for (auto const& itr : instance->GetPlayers())
|
||||
if (Player* _player = itr.GetSource())
|
||||
_player->DestroyItemCount(ITEM_GOBLIN_ROCKET_PACK, _player->GetItemCount(ITEM_GOBLIN_ROCKET_PACK), true);
|
||||
}
|
||||
|
||||
bool SetBossState(uint32 type, EncounterState state)
|
||||
{
|
||||
@@ -1742,6 +1749,8 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
{
|
||||
transport->setActive(false);
|
||||
transport->EnableMovement(false);
|
||||
//After movement is stopped remove the backpack
|
||||
RemoveBackPack();
|
||||
}
|
||||
if (Creature* captain = source->FindNearestCreature(TeamIdInInstance == TEAM_HORDE ? NPC_IGB_HIGH_OVERLORD_SAURFANG : NPC_IGB_MURADIN_BRONZEBEARD, 200.0f))
|
||||
captain->AI()->DoAction(ACTION_EXIT_SHIP);
|
||||
|
||||
Reference in New Issue
Block a user