Core/Script: Code style and remove unused core.
Signed-off-by: Gyx <[email protected]>
This commit is contained in:
@@ -45,12 +45,12 @@ public:
|
|||||||
player->GetSession()->SendNotification("Instance script not initialized");
|
player->GetSession()->SendNotification("Instance script not initialized");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (instance->GetData(EVENT_STATE) != CANNON_NOT_USED)
|
if (instance->GetData(EVENT_STATE) != CANNON_NOT_USED)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (targets.GetGOTarget() && targets.GetGOTarget()->GetEntry() == GO_DEFIAS_CANNON)
|
if (targets.GetGOTarget() && targets.GetGOTarget()->GetEntry() == GO_DEFIAS_CANNON)
|
||||||
{
|
|
||||||
instance->SetData(EVENT_STATE, CANNON_GUNPOWDER_USED);
|
instance->SetData(EVENT_STATE, CANNON_GUNPOWDER_USED);
|
||||||
}
|
|
||||||
|
|
||||||
player->DestroyItemCount(item->GetEntry(), 1, true);
|
player->DestroyItemCount(item->GetEntry(), 1, true);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -578,7 +578,8 @@ public:
|
|||||||
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[16].x, LightofDawnLoc[16].y, LightofDawnLoc[16].z);
|
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[16].x, LightofDawnLoc[16].y, LightofDawnLoc[16].z);
|
||||||
}
|
}
|
||||||
JumpToNextStep(10000);
|
JumpToNextStep(10000);
|
||||||
} break;
|
}
|
||||||
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
DoScriptText(SAY_LIGHT_OF_DAWN27, me);
|
DoScriptText(SAY_LIGHT_OF_DAWN27, me);
|
||||||
me->SetStandState(UNIT_STAND_STATE_KNEEL);
|
me->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||||
@@ -1309,7 +1310,6 @@ public:
|
|||||||
case 71:
|
case 71:
|
||||||
//if (GameObject* go = me->GetMap()->GetGameObject(uiDawnofLightGUID)) // Turn off dawn of light
|
//if (GameObject* go = me->GetMap()->GetGameObject(uiDawnofLightGUID)) // Turn off dawn of light
|
||||||
// go->SetPhaseMask(0, true);
|
// go->SetPhaseMask(0, true);
|
||||||
|
|
||||||
{
|
{
|
||||||
Map* map = me->GetMap(); // search players with in 50 yards for quest credit
|
Map* map = me->GetMap(); // search players with in 50 yards for quest credit
|
||||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||||
|
|||||||
@@ -209,10 +209,8 @@ class boss_akilzon : public CreatureScript
|
|||||||
for (std::list<Unit*>::const_iterator i = tempUnitMap.begin(); i != tempUnitMap.end(); ++i)
|
for (std::list<Unit*>::const_iterator i = tempUnitMap.begin(); i != tempUnitMap.end(); ++i)
|
||||||
{
|
{
|
||||||
if (!Cloud->IsWithinDist(*i, 6, false))
|
if (!Cloud->IsWithinDist(*i, 6, false))
|
||||||
{
|
|
||||||
Cloud->CastCustomSpell(*i, 43137, &bp0, NULL, NULL, true, 0, 0, me->GetGUID());
|
Cloud->CastCustomSpell(*i, 43137, &bp0, NULL, NULL, true, 0, 0, me->GetGUID());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// visual
|
// visual
|
||||||
float x, y, z;
|
float x, y, z;
|
||||||
z = me->GetPositionZ();
|
z = me->GetPositionZ();
|
||||||
@@ -311,7 +309,8 @@ class boss_akilzon : public CreatureScript
|
|||||||
isRaining = true;
|
isRaining = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ElectricalStorm_Timer <= diff) {
|
if (ElectricalStorm_Timer <= diff)
|
||||||
|
{
|
||||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50, true);
|
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50, true);
|
||||||
if (!target)
|
if (!target)
|
||||||
{
|
{
|
||||||
@@ -390,15 +389,11 @@ class boss_akilzon : public CreatureScript
|
|||||||
class mob_akilzon_eagle : public CreatureScript
|
class mob_akilzon_eagle : public CreatureScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
mob_akilzon_eagle() : CreatureScript("mob_akilzon_eagle") { }
|
||||||
mob_akilzon_eagle()
|
|
||||||
: CreatureScript("mob_akilzon_eagle")
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
struct mob_akilzon_eagleAI : public ScriptedAI
|
struct mob_akilzon_eagleAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
mob_akilzon_eagleAI(Creature* creature) : ScriptedAI(creature) {}
|
mob_akilzon_eagleAI(Creature* creature) : ScriptedAI(creature) { }
|
||||||
|
|
||||||
uint32 EagleSwoop_Timer;
|
uint32 EagleSwoop_Timer;
|
||||||
bool arrived;
|
bool arrived;
|
||||||
@@ -412,7 +407,10 @@ class mob_akilzon_eagle : public CreatureScript
|
|||||||
me->SetUnitMovementFlags(MOVEMENTFLAG_DISABLE_GRAVITY);
|
me->SetUnitMovementFlags(MOVEMENTFLAG_DISABLE_GRAVITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* /*who*/) {DoZoneInCombat();}
|
void EnterCombat(Unit* /*who*/)
|
||||||
|
{
|
||||||
|
DoZoneInCombat();
|
||||||
|
}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit* /*who*/) {}
|
void MoveInLineOfSight(Unit* /*who*/) {}
|
||||||
|
|
||||||
|
|||||||
@@ -186,7 +186,10 @@ struct boss_hexlord_addAI : public ScriptedAI
|
|||||||
|
|
||||||
void Reset() {}
|
void Reset() {}
|
||||||
|
|
||||||
void EnterCombat(Unit* /*who*/) {DoZoneInCombat();}
|
void EnterCombat(Unit* /*who*/)
|
||||||
|
{
|
||||||
|
DoZoneInCombat();
|
||||||
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 /*diff*/)
|
void UpdateAI(const uint32 /*diff*/)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -108,7 +108,10 @@ public:
|
|||||||
|
|
||||||
void EnterCombat(Unit* /*who*/) {}
|
void EnterCombat(Unit* /*who*/) {}
|
||||||
|
|
||||||
void DamageTaken(Unit* /*done_by*/, uint32 &damage) { damage = 0; }
|
void DamageTaken(Unit* /*done_by*/, uint32 &damage)
|
||||||
|
{
|
||||||
|
damage = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
@@ -148,9 +151,12 @@ public:
|
|||||||
|
|
||||||
void MoveInLineOfSight(Unit* /*who*/) {}
|
void MoveInLineOfSight(Unit* /*who*/) {}
|
||||||
void EnterCombat(Unit* /*who*/) {}
|
void EnterCombat(Unit* /*who*/) {}
|
||||||
void DamageTaken(Unit* /*done_by*/, uint32 &damage) { damage = 0; }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
void DamageTaken(Unit* /*done_by*/, uint32 &damage)
|
||||||
|
{
|
||||||
|
damage = 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/* This is the script for the Doomfire Spirit Mob. This mob simply follow players or
|
/* This is the script for the Doomfire Spirit Mob. This mob simply follow players or
|
||||||
@@ -188,7 +194,10 @@ public:
|
|||||||
|
|
||||||
void EnterCombat(Unit* /*who*/) {}
|
void EnterCombat(Unit* /*who*/) {}
|
||||||
|
|
||||||
void DamageTaken(Unit* /*done_by*/, uint32 &damage) { damage = 0; }
|
void DamageTaken(Unit* /*done_by*/, uint32 &damage)
|
||||||
|
{
|
||||||
|
damage = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -318,11 +318,11 @@ public:
|
|||||||
|
|
||||||
void DoSelectSummon()
|
void DoSelectSummon()
|
||||||
{
|
{
|
||||||
uint32 entry = 0;
|
|
||||||
|
|
||||||
if ((mRiftWaveCount > 2 && mWaveId < 1) || mRiftWaveCount > 3)
|
if ((mRiftWaveCount > 2 && mWaveId < 1) || mRiftWaveCount > 3)
|
||||||
mRiftWaveCount = 0;
|
mRiftWaveCount = 0;
|
||||||
|
|
||||||
|
uint32 entry = 0;
|
||||||
|
|
||||||
entry = PortalWaves[mWaveId].PortalMob[mRiftWaveCount];
|
entry = PortalWaves[mWaveId].PortalMob[mRiftWaveCount];
|
||||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: npc_time_rift: summoning wave Creature (Wave %u, Entry %u).", mRiftWaveCount, entry);
|
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: npc_time_rift: summoning wave Creature (Wave %u, Entry %u).", mRiftWaveCount, entry);
|
||||||
|
|
||||||
|
|||||||
@@ -309,7 +309,6 @@ public:
|
|||||||
|
|
||||||
bool OnGossipHello(Player* player, Creature* creature)
|
bool OnGossipHello(Player* player, Creature* creature)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (player->GetQuestStatus(QUEST_SPIRITS_WATCH_OVER_US) == QUEST_STATUS_INCOMPLETE)
|
if (player->GetQuestStatus(QUEST_SPIRITS_WATCH_OVER_US) == QUEST_STATUS_INCOMPLETE)
|
||||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_I, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_I, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||||
|
|
||||||
@@ -588,6 +587,7 @@ public:
|
|||||||
Phase = 1;
|
Phase = 1;
|
||||||
go_caribouGUID = 0;
|
go_caribouGUID = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* /*who*/) {}
|
void EnterCombat(Unit* /*who*/) {}
|
||||||
void MoveInLineOfSight(Unit* /*who*/) {}
|
void MoveInLineOfSight(Unit* /*who*/) {}
|
||||||
|
|
||||||
@@ -617,7 +617,6 @@ public:
|
|||||||
uiPhaseTimer = 2000;
|
uiPhaseTimer = 2000;
|
||||||
Phase = 2;
|
Phase = 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
if (GameObject* go_fur = me->FindNearestGameObject(GO_HIGH_QUALITY_FUR, 11.0f))
|
if (GameObject* go_fur = me->FindNearestGameObject(GO_HIGH_QUALITY_FUR, 11.0f))
|
||||||
me->GetMotionMaster()->MovePoint(0, go_fur->GetPositionX(), go_fur->GetPositionY(), go_fur->GetPositionZ());
|
me->GetMotionMaster()->MovePoint(0, go_fur->GetPositionX(), go_fur->GetPositionY(), go_fur->GetPositionZ());
|
||||||
@@ -645,7 +644,6 @@ public:
|
|||||||
uiPhaseTimer = 500;
|
uiPhaseTimer = 500;
|
||||||
Phase = 7;
|
Phase = 7;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7:
|
case 7:
|
||||||
{
|
{
|
||||||
GameObject* go_caribou = NULL;
|
GameObject* go_caribou = NULL;
|
||||||
@@ -1017,7 +1015,6 @@ public:
|
|||||||
void WaypointReached(uint32 uiPointId)
|
void WaypointReached(uint32 uiPointId)
|
||||||
{
|
{
|
||||||
Player* player = GetPlayerForEscort();
|
Player* player = GetPlayerForEscort();
|
||||||
|
|
||||||
if (!player)
|
if (!player)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -1965,7 +1962,6 @@ public:
|
|||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
case 29:
|
case 29:
|
||||||
if (player)
|
|
||||||
player->GroupEventHappens(QUEST_GET_ME_OUTA_HERE, me);
|
player->GroupEventHappens(QUEST_GET_ME_OUTA_HERE, me);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2036,7 +2032,7 @@ public:
|
|||||||
uiTimer = 1500;
|
uiTimer = 1500;
|
||||||
bStarted = false;
|
bStarted = false;
|
||||||
|
|
||||||
GameObject* pTrap;
|
GameObject* pTrap = NULL;
|
||||||
for (uint8 i = 0; i < MammothTrapsNum; ++i)
|
for (uint8 i = 0; i < MammothTrapsNum; ++i)
|
||||||
{
|
{
|
||||||
pTrap = me->FindNearestGameObject(MammothTraps[i], 11.0f);
|
pTrap = me->FindNearestGameObject(MammothTraps[i], 11.0f);
|
||||||
@@ -2071,11 +2067,12 @@ public:
|
|||||||
|
|
||||||
void MovementInform(uint32 uiType, uint32 /*uiId*/)
|
void MovementInform(uint32 uiType, uint32 /*uiId*/)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (uiType != POINT_MOTION_TYPE)
|
if (uiType != POINT_MOTION_TYPE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
me->DisappearAndDie();
|
me->DisappearAndDie();
|
||||||
GameObject* pTrap;
|
|
||||||
|
GameObject* pTrap = NULL;
|
||||||
for (uint8 i = 0; i < MammothTrapsNum; ++i)
|
for (uint8 i = 0; i < MammothTrapsNum; ++i)
|
||||||
{
|
{
|
||||||
pTrap = me->FindNearestGameObject(MammothTraps[i], 11.0f);
|
pTrap = me->FindNearestGameObject(MammothTraps[i], 11.0f);
|
||||||
@@ -2150,13 +2147,15 @@ public:
|
|||||||
|
|
||||||
struct npc_seaforium_depth_chargeAI : public ScriptedAI
|
struct npc_seaforium_depth_chargeAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
npc_seaforium_depth_chargeAI(Creature* creature) : ScriptedAI(creature) {}
|
npc_seaforium_depth_chargeAI(Creature* creature) : ScriptedAI(creature) { }
|
||||||
|
|
||||||
uint32 uiExplosionTimer;
|
uint32 uiExplosionTimer;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
uiExplosionTimer = urand(5000, 10000);
|
uiExplosionTimer = urand(5000, 10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if (uiExplosionTimer < diff)
|
if (uiExplosionTimer < diff)
|
||||||
@@ -2229,7 +2228,6 @@ public:
|
|||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const
|
CreatureAI* GetAI(Creature* creature) const
|
||||||
@@ -2561,31 +2559,31 @@ public:
|
|||||||
|
|
||||||
void AddSC_borean_tundra()
|
void AddSC_borean_tundra()
|
||||||
{
|
{
|
||||||
new npc_sinkhole_kill_credit;
|
new npc_sinkhole_kill_credit();
|
||||||
new npc_khunok_the_behemoth;
|
new npc_khunok_the_behemoth();
|
||||||
new npc_keristrasza;
|
new npc_keristrasza();
|
||||||
new npc_corastrasza;
|
new npc_corastrasza();
|
||||||
new npc_iruk;
|
new npc_iruk();
|
||||||
new mob_nerubar_victim;
|
new mob_nerubar_victim();
|
||||||
new npc_scourge_prisoner;
|
new npc_scourge_prisoner();
|
||||||
new npc_jenny;
|
new npc_jenny();
|
||||||
new npc_fezzix_geartwist;
|
new npc_fezzix_geartwist();
|
||||||
new npc_nesingwary_trapper;
|
new npc_nesingwary_trapper();
|
||||||
new npc_lurgglbr;
|
new npc_lurgglbr();
|
||||||
new npc_nexus_drake_hatchling;
|
new npc_nexus_drake_hatchling();
|
||||||
new npc_thassarian;
|
new npc_thassarian();
|
||||||
new npc_image_lich_king;
|
new npc_image_lich_king();
|
||||||
new npc_counselor_talbot;
|
new npc_counselor_talbot();
|
||||||
new npc_leryssa;
|
new npc_leryssa();
|
||||||
new npc_general_arlos;
|
new npc_general_arlos();
|
||||||
new npc_beryl_sorcerer;
|
new npc_beryl_sorcerer();
|
||||||
new npc_imprisoned_beryl_sorcerer;
|
new npc_imprisoned_beryl_sorcerer();
|
||||||
new npc_mootoo_the_younger;
|
new npc_mootoo_the_younger();
|
||||||
new npc_bonker_togglevolt;
|
new npc_bonker_togglevolt();
|
||||||
new npc_trapped_mammoth_calf;
|
new npc_trapped_mammoth_calf();
|
||||||
new npc_magmoth_crusher;
|
new npc_magmoth_crusher();
|
||||||
new npc_seaforium_depth_charge;
|
new npc_seaforium_depth_charge();
|
||||||
new npc_valiance_keep_cannoneer;
|
new npc_valiance_keep_cannoneer();
|
||||||
new npc_warmage_coldarra;
|
new npc_warmage_coldarra();
|
||||||
new npc_hidden_cultist;
|
new npc_hidden_cultist();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -392,7 +392,10 @@ public:
|
|||||||
GlaiveGUID = 0;
|
GlaiveGUID = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* /*who*/) {DoZoneInCombat();}
|
void EnterCombat(Unit* /*who*/)
|
||||||
|
{
|
||||||
|
DoZoneInCombat();
|
||||||
|
}
|
||||||
|
|
||||||
void ChargeCheck()
|
void ChargeCheck()
|
||||||
{
|
{
|
||||||
@@ -2093,7 +2096,6 @@ public:
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class gameobject_cage_trap : public GameObjectScript
|
class gameobject_cage_trap : public GameObjectScript
|
||||||
@@ -2112,7 +2114,6 @@ public:
|
|||||||
go->SetGoState(GO_STATE_ACTIVE);
|
go->SetGoState(GO_STATE_ACTIVE);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class mob_shadow_demon : public CreatureScript
|
class mob_shadow_demon : public CreatureScript
|
||||||
@@ -2131,7 +2132,10 @@ public:
|
|||||||
|
|
||||||
uint64 TargetGUID;
|
uint64 TargetGUID;
|
||||||
|
|
||||||
void EnterCombat(Unit* /*who*/) {DoZoneInCombat();}
|
void EnterCombat(Unit* /*who*/)
|
||||||
|
{
|
||||||
|
DoZoneInCombat();
|
||||||
|
}
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
@@ -2165,7 +2169,6 @@ public:
|
|||||||
DoCast(me->getVictim(), SPELL_CONSUME_SOUL);
|
DoCast(me->getVictim(), SPELL_CONSUME_SOUL);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class mob_blade_of_azzinoth : public CreatureScript
|
class mob_blade_of_azzinoth : public CreatureScript
|
||||||
@@ -2224,7 +2227,10 @@ public:
|
|||||||
DoCast(me, SPELL_SHADOWFIEND_PASSIVE, true);
|
DoCast(me, SPELL_SHADOWFIEND_PASSIVE, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* /*who*/) { DoZoneInCombat(); }
|
void EnterCombat(Unit* /*who*/)
|
||||||
|
{
|
||||||
|
DoZoneInCombat();
|
||||||
|
}
|
||||||
|
|
||||||
void DoMeleeAttackIfReady()
|
void DoMeleeAttackIfReady()
|
||||||
{
|
{
|
||||||
@@ -2270,7 +2276,6 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_boss_illidan()
|
void AddSC_boss_illidan()
|
||||||
|
|||||||
@@ -865,7 +865,6 @@ public:
|
|||||||
bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const& targets)
|
bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const& targets)
|
||||||
{
|
{
|
||||||
InstanceScript* instance = player->GetInstanceScript();
|
InstanceScript* instance = player->GetInstanceScript();
|
||||||
|
|
||||||
if (!instance)
|
if (!instance)
|
||||||
{
|
{
|
||||||
player->GetSession()->SendNotification(TEXT_NOT_INITIALIZED);
|
player->GetSession()->SendNotification(TEXT_NOT_INITIALIZED);
|
||||||
@@ -908,12 +907,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get and remove channel
|
// get and remove channel
|
||||||
|
|
||||||
if (Unit* channel = Unit::GetCreature(*vashj, CAST_AI(boss_lady_vashj::boss_lady_vashjAI, vashj->AI())->ShieldGeneratorChannel[channelIdentifier]))
|
if (Unit* channel = Unit::GetCreature(*vashj, CAST_AI(boss_lady_vashj::boss_lady_vashjAI, vashj->AI())->ShieldGeneratorChannel[channelIdentifier]))
|
||||||
{
|
channel->setDeathState(JUST_DIED); // call Unsummon()
|
||||||
// call Unsummon()
|
|
||||||
channel->setDeathState(JUST_DIED);
|
|
||||||
}
|
|
||||||
|
|
||||||
instance->SetData(identifier, 1);
|
instance->SetData(identifier, 1);
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (Creature* nether = player->SummonCreature(22408, player->GetPositionX(), player->GetPositionY()+20, player->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000))
|
if (Creature* nether = player->SummonCreature(22408, player->GetPositionX(), player->GetPositionY()+20, player->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000))
|
||||||
nether->AI()->AttackStart(player);
|
nether->AI()->AttackStart(player);
|
||||||
|
|
||||||
if (Creature* nether = player->SummonCreature(22408, player->GetPositionX(), player->GetPositionY()-20, player->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000))
|
if (Creature* nether = player->SummonCreature(22408, player->GetPositionX(), player->GetPositionY()-20, player->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000))
|
||||||
nether->AI()->AttackStart(player);
|
nether->AI()->AttackStart(player);
|
||||||
}
|
}
|
||||||
@@ -340,7 +341,7 @@ public:
|
|||||||
if (!pMammoth)
|
if (!pMammoth)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
GameObject* pTrap;
|
GameObject* pTrap = NULL;
|
||||||
for (uint8 i = 0; i < MammothTrapsNum; ++i)
|
for (uint8 i = 0; i < MammothTrapsNum; ++i)
|
||||||
{
|
{
|
||||||
pTrap = player->FindNearestGameObject(MammothTraps[i], 11.0f);
|
pTrap = player->FindNearestGameObject(MammothTraps[i], 11.0f);
|
||||||
|
|||||||
@@ -83,11 +83,8 @@ there is no difference here (except that default text is chosen with `gameobject
|
|||||||
|
|
||||||
#define BOX_UNLEARN_WEAPON_SPEC "Do you really want to unlearn your weaponsmith specialty and lose all associated recipes? \n Cost: "
|
#define BOX_UNLEARN_WEAPON_SPEC "Do you really want to unlearn your weaponsmith specialty and lose all associated recipes? \n Cost: "
|
||||||
|
|
||||||
#define GOSSIP_LEARN_DRAGON "I am absolutely certain that i want to learn dragonscale leatherworking"
|
|
||||||
#define GOSSIP_UNLEARN_DRAGON "I wish to unlearn Dragonscale Leatherworking"
|
#define GOSSIP_UNLEARN_DRAGON "I wish to unlearn Dragonscale Leatherworking"
|
||||||
#define GOSSIP_LEARN_ELEMENTAL "I am absolutely certain that i want to learn elemental leatherworking"
|
|
||||||
#define GOSSIP_UNLEARN_ELEMENTAL "I wish to unlearn Elemental Leatherworking"
|
#define GOSSIP_UNLEARN_ELEMENTAL "I wish to unlearn Elemental Leatherworking"
|
||||||
#define GOSSIP_LEARN_TRIBAL "I am absolutely certain that i want to learn tribal leatherworking"
|
|
||||||
#define GOSSIP_UNLEARN_TRIBAL "I wish to unlearn Tribal Leatherworking"
|
#define GOSSIP_UNLEARN_TRIBAL "I wish to unlearn Tribal Leatherworking"
|
||||||
|
|
||||||
#define BOX_UNLEARN_LEATHER_SPEC "Do you really want to unlearn your leatherworking specialty and lose all associated recipes? \n Cost: "
|
#define BOX_UNLEARN_LEATHER_SPEC "Do you really want to unlearn your leatherworking specialty and lose all associated recipes? \n Cost: "
|
||||||
@@ -101,9 +98,6 @@ there is no difference here (except that default text is chosen with `gameobject
|
|||||||
|
|
||||||
#define BOX_UNLEARN_TAILOR_SPEC "Do you really want to unlearn your tailoring specialty and lose all associated recipes? \n Cost: "
|
#define BOX_UNLEARN_TAILOR_SPEC "Do you really want to unlearn your tailoring specialty and lose all associated recipes? \n Cost: "
|
||||||
|
|
||||||
#define GOSSIP_LEARN_GOBLIN "I am absolutely certain that i want to learn Goblin engineering"
|
|
||||||
#define GOSSIP_LEARN_GNOMISH "I am absolutely certain that i want to learn Gnomish engineering"
|
|
||||||
|
|
||||||
/*###
|
/*###
|
||||||
# spells defines
|
# spells defines
|
||||||
###*/
|
###*/
|
||||||
@@ -387,8 +381,10 @@ public:
|
|||||||
{
|
{
|
||||||
if (creature->isQuestGiver())
|
if (creature->isQuestGiver())
|
||||||
player->PrepareQuestMenu(creature->GetGUID());
|
player->PrepareQuestMenu(creature->GetGUID());
|
||||||
|
|
||||||
if (creature->isVendor())
|
if (creature->isVendor())
|
||||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||||
|
|
||||||
if (creature->isTrainer())
|
if (creature->isTrainer())
|
||||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
|
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
|
||||||
|
|
||||||
@@ -512,10 +508,21 @@ public:
|
|||||||
player->PlayerTalkClass->ClearMenus();
|
player->PlayerTalkClass->ClearMenus();
|
||||||
switch (sender)
|
switch (sender)
|
||||||
{
|
{
|
||||||
case GOSSIP_SENDER_MAIN: SendActionMenu(player, creature, action); break;
|
case GOSSIP_SENDER_MAIN:
|
||||||
case GOSSIP_SENDER_LEARN: SendConfirmLearn(player, creature, action); break;
|
SendActionMenu(player, creature, action);
|
||||||
case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn(player, creature, action); break;
|
break;
|
||||||
case GOSSIP_SENDER_CHECK: SendActionMenu(player, creature, action); break;
|
|
||||||
|
case GOSSIP_SENDER_LEARN:
|
||||||
|
SendConfirmLearn(player, creature, action);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GOSSIP_SENDER_UNLEARN:
|
||||||
|
SendConfirmUnlearn(player, creature, action);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GOSSIP_SENDER_CHECK:
|
||||||
|
SendActionMenu(player, creature, action);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -539,8 +546,10 @@ public:
|
|||||||
{
|
{
|
||||||
if (creature->isQuestGiver())
|
if (creature->isQuestGiver())
|
||||||
player->PrepareQuestMenu(creature->GetGUID());
|
player->PrepareQuestMenu(creature->GetGUID());
|
||||||
|
|
||||||
if (creature->isVendor())
|
if (creature->isVendor())
|
||||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||||
|
|
||||||
if (creature->isTrainer())
|
if (creature->isTrainer())
|
||||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
|
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
|
||||||
|
|
||||||
@@ -729,10 +738,21 @@ public:
|
|||||||
player->PlayerTalkClass->ClearMenus();
|
player->PlayerTalkClass->ClearMenus();
|
||||||
switch (sender)
|
switch (sender)
|
||||||
{
|
{
|
||||||
case GOSSIP_SENDER_MAIN: SendActionMenu(player, creature, action); break;
|
case GOSSIP_SENDER_MAIN:
|
||||||
case GOSSIP_SENDER_LEARN: SendConfirmLearn(player, creature, action); break;
|
SendActionMenu(player, creature, action);
|
||||||
case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn(player, creature, action); break;
|
break;
|
||||||
case GOSSIP_SENDER_CHECK: SendActionMenu(player, creature, action); break;
|
|
||||||
|
case GOSSIP_SENDER_LEARN:
|
||||||
|
SendConfirmLearn(player, creature, action);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GOSSIP_SENDER_UNLEARN:
|
||||||
|
SendConfirmUnlearn(player, creature, action);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GOSSIP_SENDER_CHECK:
|
||||||
|
SendActionMenu(player, creature, action);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -763,7 +783,6 @@ enum eEngineeringTrinkets
|
|||||||
#define GOSSIP_ITEM_ZAP "[PH] Unknown"
|
#define GOSSIP_ITEM_ZAP "[PH] Unknown"
|
||||||
#define GOSSIP_ITEM_JHORDY "I must build a beacon for this marvelous device!"
|
#define GOSSIP_ITEM_JHORDY "I must build a beacon for this marvelous device!"
|
||||||
#define GOSSIP_ITEM_KABLAM "[PH] Unknown"
|
#define GOSSIP_ITEM_KABLAM "[PH] Unknown"
|
||||||
#define GOSSIP_ITEM_SMILES "[PH] Unknown"
|
|
||||||
|
|
||||||
class npc_engineering_tele_trinket : public CreatureScript
|
class npc_engineering_tele_trinket : public CreatureScript
|
||||||
{
|
{
|
||||||
@@ -866,8 +885,10 @@ public:
|
|||||||
{
|
{
|
||||||
if (creature->isQuestGiver())
|
if (creature->isQuestGiver())
|
||||||
player->PrepareQuestMenu(creature->GetGUID());
|
player->PrepareQuestMenu(creature->GetGUID());
|
||||||
|
|
||||||
if (creature->isVendor())
|
if (creature->isVendor())
|
||||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||||
|
|
||||||
if (creature->isTrainer())
|
if (creature->isTrainer())
|
||||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
|
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
|
||||||
|
|
||||||
@@ -953,9 +974,17 @@ public:
|
|||||||
player->PlayerTalkClass->ClearMenus();
|
player->PlayerTalkClass->ClearMenus();
|
||||||
switch (sender)
|
switch (sender)
|
||||||
{
|
{
|
||||||
case GOSSIP_SENDER_MAIN: SendActionMenu(player, creature, action); break;
|
case GOSSIP_SENDER_MAIN:
|
||||||
case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn(player, creature, action); break;
|
SendActionMenu(player, creature, action);
|
||||||
case GOSSIP_SENDER_CHECK: SendActionMenu(player, creature, action); break;
|
break;
|
||||||
|
|
||||||
|
case GOSSIP_SENDER_UNLEARN:
|
||||||
|
SendConfirmUnlearn(player, creature, action);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GOSSIP_SENDER_CHECK:
|
||||||
|
SendActionMenu(player, creature, action);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -979,8 +1008,10 @@ public:
|
|||||||
{
|
{
|
||||||
if (creature->isQuestGiver())
|
if (creature->isQuestGiver())
|
||||||
player->PrepareQuestMenu(creature->GetGUID());
|
player->PrepareQuestMenu(creature->GetGUID());
|
||||||
|
|
||||||
if (creature->isVendor())
|
if (creature->isVendor())
|
||||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||||
|
|
||||||
if (creature->isTrainer())
|
if (creature->isTrainer())
|
||||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
|
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
|
||||||
|
|
||||||
@@ -1105,24 +1136,31 @@ public:
|
|||||||
player->PlayerTalkClass->ClearMenus();
|
player->PlayerTalkClass->ClearMenus();
|
||||||
switch (sender)
|
switch (sender)
|
||||||
{
|
{
|
||||||
case GOSSIP_SENDER_MAIN: SendActionMenu(player, creature, action); break;
|
case GOSSIP_SENDER_MAIN:
|
||||||
case GOSSIP_SENDER_LEARN: SendConfirmLearn(player, creature, action); break;
|
SendActionMenu(player, creature, action);
|
||||||
case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn(player, creature, action); break;
|
break;
|
||||||
case GOSSIP_SENDER_CHECK: SendActionMenu(player, creature, action); break;
|
|
||||||
|
case GOSSIP_SENDER_LEARN:
|
||||||
|
SendConfirmLearn(player, creature, action);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GOSSIP_SENDER_UNLEARN:
|
||||||
|
SendConfirmUnlearn(player, creature, action);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GOSSIP_SENDER_CHECK:
|
||||||
|
SendActionMenu(player, creature, action);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*###
|
|
||||||
#
|
|
||||||
###*/
|
|
||||||
|
|
||||||
void AddSC_npc_professions()
|
void AddSC_npc_professions()
|
||||||
{
|
{
|
||||||
new npc_prof_alchemy;
|
new npc_prof_alchemy();
|
||||||
new npc_prof_blacksmith;
|
new npc_prof_blacksmith();
|
||||||
new npc_engineering_tele_trinket;
|
new npc_engineering_tele_trinket();
|
||||||
new npc_prof_leather;
|
new npc_prof_leather();
|
||||||
new npc_prof_tailor;
|
new npc_prof_tailor();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user