Merge pull request #5755 from GyxTom/master

Core/Script: Clean-Up in Scripts.
This commit is contained in:
Machiavelli
2012-03-17 04:02:41 -07:00
30 changed files with 587 additions and 262 deletions
@@ -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;
@@ -111,12 +111,33 @@ public:
switch (uiSpeech_counter) switch (uiSpeech_counter)
{ {
case 1: DoScriptText(SAY_PERSUADED1, me); uiSpeech_timer = 8000; break; case 1:
case 2: DoScriptText(SAY_PERSUADED2, me); uiSpeech_timer = 8000; break; DoScriptText(SAY_PERSUADED1, me);
case 3: DoScriptText(SAY_PERSUADED3, me); uiSpeech_timer = 8000; break; uiSpeech_timer = 8000;
case 4: DoScriptText(SAY_PERSUADED4, me); uiSpeech_timer = 8000; break; break;
case 5: DoScriptText(SAY_PERSUADED5, player); uiSpeech_timer = 8000; break;
case 6: DoScriptText(SAY_PERSUADED6, me); case 2:
DoScriptText(SAY_PERSUADED2, me);
uiSpeech_timer = 8000;
break;
case 3:
DoScriptText(SAY_PERSUADED3, me);
uiSpeech_timer = 8000;
break;
case 4:
DoScriptText(SAY_PERSUADED4, me);
uiSpeech_timer = 8000;
break;
case 5:
DoScriptText(SAY_PERSUADED5, player);
uiSpeech_timer = 8000;
break;
case 6:
DoScriptText(SAY_PERSUADED6, me);
player->Kill(me); player->Kill(me);
//me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); //me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
//me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); //me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
@@ -704,7 +725,9 @@ public:
me->SetStandState(UNIT_STAND_STATE_KNEEL); me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break; break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
break;
case 11: case 11:
DoScriptText(EMOTE_DIES, me); DoScriptText(EMOTE_DIES, me);
me->setDeathState(JUST_DIED); me->setDeathState(JUST_DIED);
@@ -732,7 +755,9 @@ public:
me->SetStandState(UNIT_STAND_STATE_KNEEL); me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break; break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
break;
case 11: case 11:
DoScriptText(EMOTE_DIES, me); DoScriptText(EMOTE_DIES, me);
me->setDeathState(JUST_DIED); me->setDeathState(JUST_DIED);
@@ -760,7 +785,9 @@ public:
me->SetStandState(UNIT_STAND_STATE_KNEEL); me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break; break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
break;
case 11: case 11:
DoScriptText(EMOTE_DIES, me); DoScriptText(EMOTE_DIES, me);
me->setDeathState(JUST_DIED); me->setDeathState(JUST_DIED);
@@ -788,7 +815,9 @@ public:
me->SetStandState(UNIT_STAND_STATE_KNEEL); me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break; break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
break;
case 11: case 11:
DoScriptText(EMOTE_DIES, me); DoScriptText(EMOTE_DIES, me);
me->setDeathState(JUST_DIED); me->setDeathState(JUST_DIED);
@@ -816,7 +845,9 @@ public:
me->SetStandState(UNIT_STAND_STATE_KNEEL); me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break; break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
break;
case 11: case 11:
DoScriptText(EMOTE_DIES, me); DoScriptText(EMOTE_DIES, me);
me->setDeathState(JUST_DIED); me->setDeathState(JUST_DIED);
@@ -844,7 +875,9 @@ public:
me->SetStandState(UNIT_STAND_STATE_KNEEL); me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break; break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
break;
case 11: case 11:
DoScriptText(EMOTE_DIES, me); DoScriptText(EMOTE_DIES, me);
me->setDeathState(JUST_DIED); me->setDeathState(JUST_DIED);
@@ -872,7 +905,9 @@ public:
me->SetStandState(UNIT_STAND_STATE_KNEEL); me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break; break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
break;
case 11: case 11:
DoScriptText(EMOTE_DIES, me); DoScriptText(EMOTE_DIES, me);
me->setDeathState(JUST_DIED); me->setDeathState(JUST_DIED);
@@ -900,7 +935,9 @@ public:
me->SetStandState(UNIT_STAND_STATE_KNEEL); me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break; break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
break;
case 11: case 11:
DoScriptText(EMOTE_DIES, me); DoScriptText(EMOTE_DIES, me);
me->setDeathState(JUST_DIED); me->setDeathState(JUST_DIED);
@@ -928,7 +965,9 @@ public:
me->SetStandState(UNIT_STAND_STATE_KNEEL); me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break; break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
break;
case 11: case 11:
DoScriptText(EMOTE_DIES, me); DoScriptText(EMOTE_DIES, me);
me->setDeathState(JUST_DIED); me->setDeathState(JUST_DIED);
@@ -956,7 +995,9 @@ public:
me->SetStandState(UNIT_STAND_STATE_KNEEL); me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break; break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break; case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
break;
case 11: case 11:
DoScriptText(EMOTE_DIES, me); DoScriptText(EMOTE_DIES, me);
me->setDeathState(JUST_DIED); me->setDeathState(JUST_DIED);
@@ -978,7 +1019,6 @@ public:
} }
} }
}; };
}; };
void AddSC_the_scarlet_enclave_c2() void AddSC_the_scarlet_enclave_c2()
@@ -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);
@@ -938,7 +939,7 @@ public:
case 33: // Darion supports to jump to lich king here case 33: // Darion supports to jump to lich king here
if (Unit::GetCreature(*me, uiLichKingGUID)) if (Unit::GetCreature(*me, uiLichKingGUID))
DoCast(me, SPELL_MOGRAINE_CHARGE); // jumping charge DoCast(me, SPELL_MOGRAINE_CHARGE); // jumping charge
// doesn't make it looks well, so workarounds, Darion charges, looks better // doesn't make it looks well, so workarounds, Darion charges, looks better
me->SetSpeed(MOVE_RUN, 3.0f); me->SetSpeed(MOVE_RUN, 3.0f);
me->SetWalk(false); me->SetWalk(false);
SetHoldState(false); SetHoldState(false);
@@ -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,9 +209,7 @@ 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;
@@ -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*/)
{ {
@@ -73,21 +73,29 @@ class npc_professor_phizzlethorpe : public CreatureScript
switch (uiPointId) switch (uiPointId)
{ {
case 4:Talk(SAY_PROGRESS_2, player->GetGUID());break; case 4:
case 5:Talk(SAY_PROGRESS_3, player->GetGUID());break; Talk(SAY_PROGRESS_2, player->GetGUID());
case 8:Talk(EMOTE_PROGRESS_4);break; break;
case 5:
Talk(SAY_PROGRESS_3, player->GetGUID());
break;
case 8:
Talk(EMOTE_PROGRESS_4);
break;
case 9: case 9:
{
me->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96f, -2142.49f, 20.15f, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); me->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96f, -2142.49f, 20.15f, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
me->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96f, -2142.49f, 20.15f, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); me->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96f, -2142.49f, 20.15f, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
break; break;
} case 10:
case 10:Talk(SAY_PROGRESS_5, player->GetGUID());break; Talk(SAY_PROGRESS_5, player->GetGUID());
break;
case 11: case 11:
Talk(SAY_PROGRESS_6, player->GetGUID()); Talk(SAY_PROGRESS_6, player->GetGUID());
SetRun(); SetRun();
break; break;
case 19:Talk(SAY_PROGRESS_7, player->GetGUID()); break; case 19:
Talk(SAY_PROGRESS_7, player->GetGUID());
break;
case 20: case 20:
Talk(EMOTE_PROGRESS_8); Talk(EMOTE_PROGRESS_8);
Talk(SAY_PROGRESS_9, player->GetGUID()); Talk(SAY_PROGRESS_9, player->GetGUID());
@@ -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)
{ {
@@ -896,9 +896,17 @@ void hyjalAI::UpdateAI(const uint32 diff)
switch (Spells[i].TargetType) switch (Spells[i].TargetType)
{ {
case TARGETTYPE_SELF: target = me; break; case TARGETTYPE_SELF:
case TARGETTYPE_RANDOM: target = SelectTarget(SELECT_TARGET_RANDOM, 0); break; target = me;
case TARGETTYPE_VICTIM: target = me->getVictim(); break; break;
case TARGETTYPE_RANDOM:
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
break;
case TARGETTYPE_VICTIM:
target = me->getVictim();
break;
} }
if (target && target->isAlive()) if (target && target->isAlive())
@@ -176,17 +176,23 @@ public:
{ {
switch (type) switch (type)
{ {
case DATA_RAGEWINTERCHILLEVENT: m_auiEncounter[0] = data; break; case DATA_RAGEWINTERCHILLEVENT:
m_auiEncounter[0] = data;
break;
case DATA_ANETHERONEVENT: case DATA_ANETHERONEVENT:
m_auiEncounter[1] = data; m_auiEncounter[1] = data;
break; break;
case DATA_KAZROGALEVENT: m_auiEncounter[2] = data; break; case DATA_KAZROGALEVENT:
m_auiEncounter[2] = data;
break;
case DATA_AZGALOREVENT: case DATA_AZGALOREVENT:
{ {
m_auiEncounter[3] = data; m_auiEncounter[3] = data;
if (data == DONE) if (data == DONE)
{ {
if (ArchiYell)break; if (ArchiYell)
break;
ArchiYell = true; ArchiYell = true;
Creature* creature = instance->GetCreature(Azgalor); Creature* creature = instance->GetCreature(Azgalor);
@@ -220,12 +226,17 @@ public:
} }
} }
break; break;
case DATA_ARCHIMONDEEVENT: m_auiEncounter[4] = data; break; case DATA_ARCHIMONDEEVENT:
case DATA_RESET_TRASH_COUNT: Trash = 0; break; m_auiEncounter[4] = data;
break;
case DATA_RESET_TRASH_COUNT:
Trash = 0;
break;
case DATA_TRASH: case DATA_TRASH:
if (data) Trash = data; if (data)
else Trash--; Trash = data;
else
Trash--;
DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, Trash); DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, Trash);
break; break;
case TYPE_RETREAT: case TYPE_RETREAT:
@@ -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);
-1
View File
@@ -516,7 +516,6 @@ public:
{ {
} }
}; };
}; };
void AddSC_azshara() void AddSC_azshara()
@@ -309,8 +309,13 @@ public:
me->SetHealth(me->CountPctFromMaxHealth(15)); me->SetHealth(me->CountPctFromMaxHealth(15));
switch (rand()%2) switch (rand()%2)
{ {
case 0: me->SetStandState(UNIT_STAND_STATE_SIT); break; case 0:
case 1: me->SetStandState(UNIT_STAND_STATE_SLEEP); break; me->SetStandState(UNIT_STAND_STATE_SIT);
break;
case 1:
me->SetStandState(UNIT_STAND_STATE_SLEEP);
break;
} }
} }
@@ -402,8 +402,13 @@ public:
switch (go->GetEntry()) switch (go->GetEntry())
{ {
case GO_SPHERE1: instance->SetData(DATA_SPHERE1_EVENT, IN_PROGRESS); break; case GO_SPHERE1:
case GO_SPHERE2: instance->SetData(DATA_SPHERE2_EVENT, IN_PROGRESS); break; instance->SetData(DATA_SPHERE1_EVENT, IN_PROGRESS);
break;
case GO_SPHERE2:
instance->SetData(DATA_SPHERE2_EVENT, IN_PROGRESS);
break;
} }
CAST_AI(boss_taldaram::boss_taldaramAI, pPrinceTaldaram->AI())->CheckSpheres(); CAST_AI(boss_taldaram::boss_taldaramAI, pPrinceTaldaram->AI())->CheckSpheres();
@@ -110,26 +110,37 @@ public:
{ {
switch (go->GetEntry()) switch (go->GetEntry())
{ {
case 193564: Prince_TaldaramPlatform = go->GetGUID(); case 193564:
if (m_auiEncounter[1] == DONE) HandleGameObject(0, true, go); break; Prince_TaldaramPlatform = go->GetGUID();
case 193093: Prince_TaldaramSpheres[0] = go->GetGUID(); if (m_auiEncounter[1] == DONE)
HandleGameObject(0, true, go);
break;
case 193093:
Prince_TaldaramSpheres[0] = go->GetGUID();
if (spheres[0] == IN_PROGRESS) if (spheres[0] == IN_PROGRESS)
{ {
go->SetGoState(GO_STATE_ACTIVE); go->SetGoState(GO_STATE_ACTIVE);
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
} }
else go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); else
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
break; break;
case 193094: Prince_TaldaramSpheres[1] = go->GetGUID(); case 193094:
Prince_TaldaramSpheres[1] = go->GetGUID();
if (spheres[1] == IN_PROGRESS) if (spheres[1] == IN_PROGRESS)
{ {
go->SetGoState(GO_STATE_ACTIVE); go->SetGoState(GO_STATE_ACTIVE);
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
} }
else go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); else
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
break;
case 192236:
Prince_TaldaramGate = go->GetGUID(); // Web gate past Prince Taldaram
if (m_auiEncounter[1] == DONE)
HandleGameObject(0, true, go);
break; break;
case 192236: Prince_TaldaramGate = go->GetGUID(); // Web gate past Prince Taldaram
if (m_auiEncounter[1] == DONE)HandleGameObject(0, true, go);break;
} }
} }
@@ -137,8 +148,13 @@ public:
{ {
switch (idx) switch (idx)
{ {
case DATA_ADD_JEDOGA_OPFER: JedogaSacrifices = guid; break; case DATA_ADD_JEDOGA_OPFER:
case DATA_PL_JEDOGA_TARGET: JedogaTarget = guid; break; JedogaSacrifices = guid;
break;
case DATA_PL_JEDOGA_TARGET:
JedogaTarget = guid;
break;
} }
} }
@@ -179,7 +195,9 @@ public:
{ {
switch (type) switch (type)
{ {
case DATA_ELDER_NADOX_EVENT: m_auiEncounter[0] = data; break; case DATA_ELDER_NADOX_EVENT:
m_auiEncounter[0] = data;
break;
case DATA_PRINCE_TALDARAM_EVENT: case DATA_PRINCE_TALDARAM_EVENT:
if (data == DONE) if (data == DONE)
HandleGameObject(Prince_TaldaramGate, true); HandleGameObject(Prince_TaldaramGate, true);
@@ -201,11 +219,21 @@ public:
} }
} }
break; break;
case DATA_HERALD_VOLAZJ_EVENT: m_auiEncounter[3] = data; break; case DATA_HERALD_VOLAZJ_EVENT:
case DATA_AMANITAR_EVENT: m_auiEncounter[4] = data; break; m_auiEncounter[3] = data;
case DATA_SPHERE1_EVENT: spheres[0] = data; break; break;
case DATA_SPHERE2_EVENT: spheres[1] = data; break; case DATA_AMANITAR_EVENT:
case DATA_JEDOGA_TRIGGER_SWITCH: switchtrigger = data; break; m_auiEncounter[4] = data;
break;
case DATA_SPHERE1_EVENT:
spheres[0] = data;
break;
case DATA_SPHERE2_EVENT:
spheres[1] = data;
break;
case DATA_JEDOGA_TRIGGER_SWITCH:
switchtrigger = data;
break;
case DATA_JEDOGA_RESET_INITIANDS: case DATA_JEDOGA_RESET_INITIANDS:
for (std::set<uint64>::const_iterator itr = InitiandGUIDs.begin(); itr != InitiandGUIDs.end(); ++itr) for (std::set<uint64>::const_iterator itr = InitiandGUIDs.begin(); itr != InitiandGUIDs.end(); ++itr)
{ {
@@ -426,9 +426,17 @@ public:
{ {
switch (urand(0, 2)) switch (urand(0, 2))
{ {
case 0: me->SummonCreature(CREATURE_YMIRJAR_WARRIOR, SpawnLoc.GetPositionX()+rand()%5, SpawnLoc.GetPositionY()+rand()%5, SpawnLoc.GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); break; case 0:
case 1: me->SummonCreature(CREATURE_YMIRJAR_WITCH_DOCTOR, SpawnLoc.GetPositionX()+rand()%5, SpawnLoc.GetPositionY()+rand()%5, SpawnLoc.GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); break; me->SummonCreature(CREATURE_YMIRJAR_WARRIOR, SpawnLoc.GetPositionX()+rand()%5, SpawnLoc.GetPositionY()+rand()%5, SpawnLoc.GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
case 2: me->SummonCreature(CREATURE_YMIRJAR_HARPOONER, SpawnLoc.GetPositionX()+rand()%5, SpawnLoc.GetPositionY()+rand()%5, SpawnLoc.GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); break; break;
case 1:
me->SummonCreature(CREATURE_YMIRJAR_WITCH_DOCTOR, SpawnLoc.GetPositionX()+rand()%5, SpawnLoc.GetPositionY()+rand()%5, SpawnLoc.GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break;
case 2:
me->SummonCreature(CREATURE_YMIRJAR_HARPOONER, SpawnLoc.GetPositionX()+rand()%5, SpawnLoc.GetPositionY()+rand()%5, SpawnLoc.GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break;
} }
} }
} }
+37 -39
View File
@@ -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;
@@ -662,7 +660,7 @@ public:
Phase = 8; Phase = 8;
uiPhaseTimer = 1000; uiPhaseTimer = 1000;
} }
break; break;
case 8: case 8:
DoCast(me, SPELL_TRAPPED, true); DoCast(me, SPELL_TRAPPED, true);
Phase = 0; Phase = 0;
@@ -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,8 +1962,7 @@ 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();
} }
@@ -323,8 +323,13 @@ public:
DoCast(me, SPELL_DUST_FIELD, true); DoCast(me, SPELL_DUST_FIELD, true);
switch (m_gender) switch (m_gender)
{ {
case GENDER_FEMALE: DoPlaySoundToSet(me, SOUND_FEMALE); break; case GENDER_FEMALE:
case GENDER_MALE: DoPlaySoundToSet(me, SOUND_MALE); break; DoPlaySoundToSet(me, SOUND_FEMALE);
break;
case GENDER_MALE:
DoPlaySoundToSet(me, SOUND_MALE);
break;
} }
} }
} }
@@ -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()
@@ -543,8 +543,13 @@ public:
{ {
switch (urand(0, 1)) switch (urand(0, 1))
{ {
case 0: DoCast(unit, SPELL_BLESS_SPELLWARD); break; case 0:
case 1: DoCast(unit, SPELL_BLESS_PROTECTION); break; DoCast(unit, SPELL_BLESS_SPELLWARD);
break;
case 1:
DoCast(unit, SPELL_BLESS_PROTECTION);
break;
} }
} }
BlessingTimer = 60000; BlessingTimer = 60000;
@@ -164,28 +164,75 @@ public:
{ {
switch (go->GetEntry()) switch (go->GetEntry())
{ {
case 185483: NajentusGate = go->GetGUID();// Gate past Naj'entus (at the entrance to Supermoose's courtyards) case 185483:
if (m_auiEncounter[0] == DONE)HandleGameObject(0, true, go);break; NajentusGate = go->GetGUID();// Gate past Naj'entus (at the entrance to Supermoose's courtyards)
case 185882: MainTempleDoors = go->GetGUID();// Main Temple Doors - right past Supermoose (Supremus) if (m_auiEncounter[0] == DONE)
if (m_auiEncounter[1] == DONE)HandleGameObject(0, true, go);break; HandleGameObject(0, true, go);
case 185478: ShadeOfAkamaDoor = go->GetGUID();break; break;
case 185480: CommonDoor = go->GetGUID();
if (m_auiEncounter[3] == DONE)HandleGameObject(0, true, go);break; case 185882:
case 186153: TeronDoor = go->GetGUID(); MainTempleDoors = go->GetGUID();// Main Temple Doors - right past Supermoose (Supremus)
if (m_auiEncounter[3] == DONE)HandleGameObject(0, true, go);break; if (m_auiEncounter[1] == DONE)
case 185892: GuurtogDoor = go->GetGUID(); HandleGameObject(0, true, go);
if (m_auiEncounter[4] == DONE)HandleGameObject(0, true, go);break; break;
case 185479: TempleDoor = go->GetGUID();
if (m_auiEncounter[5] == DONE)HandleGameObject(0, true, go);break; case 185478:
case 185482: MotherDoor = go->GetGUID(); ShadeOfAkamaDoor = go->GetGUID();
if (m_auiEncounter[6] == DONE)HandleGameObject(0, true, go);break; break;
case 185481: CouncilDoor = go->GetGUID();
if (m_auiEncounter[7] == DONE)HandleGameObject(0, true, go);break; case 185480:
case 186152: SimpleDoor = go->GetGUID(); CommonDoor = go->GetGUID();
if (m_auiEncounter[7] == DONE)HandleGameObject(0, true, go);break; if (m_auiEncounter[3] == DONE)
case 185905: IllidanGate = go->GetGUID(); break; // Gate leading to Temple Summit HandleGameObject(0, true, go);
case 186261: IllidanDoor[0] = go->GetGUID(); break; // Right door at Temple Summit break;
case 186262: IllidanDoor[1] = go->GetGUID(); break; // Left door at Temple Summit
case 186153:
TeronDoor = go->GetGUID();
if (m_auiEncounter[3] == DONE)
HandleGameObject(0, true, go);
break;
case 185892:
GuurtogDoor = go->GetGUID();
if (m_auiEncounter[4] == DONE)
HandleGameObject(0, true, go);
break;
case 185479:
TempleDoor = go->GetGUID();
if (m_auiEncounter[5] == DONE)
HandleGameObject(0, true, go);
break;
case 185482:
MotherDoor = go->GetGUID();
if (m_auiEncounter[6] == DONE)
HandleGameObject(0, true, go);
break;
case 185481:
CouncilDoor = go->GetGUID();
if (m_auiEncounter[7] == DONE)
HandleGameObject(0, true, go);
break;
case 186152:
SimpleDoor = go->GetGUID();
if (m_auiEncounter[7] == DONE)
HandleGameObject(0, true, go);
break;
case 185905:
IllidanGate = go->GetGUID(); // Gate leading to Temple Summit
break;
case 186261:
IllidanDoor[0] = go->GetGUID(); // Right door at Temple Summit
break;
case 186262:
IllidanDoor[1] = go->GetGUID(); // Left door at Temple Summit
break;
} }
} }
@@ -221,63 +268,65 @@ public:
{ {
case DATA_HIGHWARLORDNAJENTUSEVENT: case DATA_HIGHWARLORDNAJENTUSEVENT:
if (data == DONE) if (data == DONE)
{
HandleGameObject(NajentusGate, true); HandleGameObject(NajentusGate, true);
} m_auiEncounter[0] = data;
m_auiEncounter[0] = data;break; break;
case DATA_SUPREMUSEVENT: case DATA_SUPREMUSEVENT:
if (data == DONE) if (data == DONE)
{
HandleGameObject(NajentusGate, true); HandleGameObject(NajentusGate, true);
} m_auiEncounter[1] = data;
m_auiEncounter[1] = data; break; break;
case DATA_SHADEOFAKAMAEVENT: case DATA_SHADEOFAKAMAEVENT:
if (data == IN_PROGRESS) if (data == IN_PROGRESS)
{
HandleGameObject(ShadeOfAkamaDoor, false); HandleGameObject(ShadeOfAkamaDoor, false);
} else HandleGameObject(ShadeOfAkamaDoor, true); else
m_auiEncounter[2] = data; break; HandleGameObject(ShadeOfAkamaDoor, true);
m_auiEncounter[2] = data;
break;
case DATA_TERONGOREFIENDEVENT: case DATA_TERONGOREFIENDEVENT:
if (data == IN_PROGRESS) if (data == IN_PROGRESS)
{ {
HandleGameObject(TeronDoor, false); HandleGameObject(TeronDoor, false);
HandleGameObject(CommonDoor, false); HandleGameObject(CommonDoor, false);
}else }
else
{ {
HandleGameObject(TeronDoor, true); HandleGameObject(TeronDoor, true);
HandleGameObject(CommonDoor, true); HandleGameObject(CommonDoor, true);
} }
m_auiEncounter[3] = data; break; m_auiEncounter[3] = data;
break;
case DATA_GURTOGGBLOODBOILEVENT: case DATA_GURTOGGBLOODBOILEVENT:
if (data == DONE) if (data == DONE)
{
HandleGameObject(GuurtogDoor, true); HandleGameObject(GuurtogDoor, true);
} m_auiEncounter[4] = data;
m_auiEncounter[4] = data; break; break;
case DATA_RELIQUARYOFSOULSEVENT: case DATA_RELIQUARYOFSOULSEVENT:
if (data == DONE) if (data == DONE)
{
HandleGameObject(TempleDoor, true); HandleGameObject(TempleDoor, true);
} m_auiEncounter[5] = data;
m_auiEncounter[5] = data; break; break;
case DATA_MOTHERSHAHRAZEVENT: case DATA_MOTHERSHAHRAZEVENT:
if (data == DONE) if (data == DONE)
{
HandleGameObject(MotherDoor, true); HandleGameObject(MotherDoor, true);
} m_auiEncounter[6] = data;
m_auiEncounter[6] = data; break; break;
case DATA_ILLIDARICOUNCILEVENT: case DATA_ILLIDARICOUNCILEVENT:
if (data == IN_PROGRESS) if (data == IN_PROGRESS)
{ {
HandleGameObject(CouncilDoor, false); HandleGameObject(CouncilDoor, false);
HandleGameObject(SimpleDoor, false); HandleGameObject(SimpleDoor, false);
}else }
else
{ {
HandleGameObject(CouncilDoor, true); HandleGameObject(CouncilDoor, true);
HandleGameObject(SimpleDoor, true); HandleGameObject(SimpleDoor, true);
} }
m_auiEncounter[7] = data; break; m_auiEncounter[7] = data;
case DATA_ILLIDANSTORMRAGEEVENT: m_auiEncounter[8] = data; break; break;
case DATA_ILLIDANSTORMRAGEEVENT:
m_auiEncounter[8] = data;
break;
} }
if (data == DONE) if (data == DONE)
@@ -177,13 +177,9 @@ public:
void KilledUnit(Unit* /*victim*/) void KilledUnit(Unit* /*victim*/)
{ {
if (CorruptedForm) if (CorruptedForm)
{
DoScriptText(RAND(SAY_CORRUPT_SLAY1, SAY_CORRUPT_SLAY2), me); DoScriptText(RAND(SAY_CORRUPT_SLAY1, SAY_CORRUPT_SLAY2), me);
}
else else
{
DoScriptText(RAND(SAY_CLEAN_SLAY1, SAY_CLEAN_SLAY2), me); DoScriptText(RAND(SAY_CLEAN_SLAY1, SAY_CLEAN_SLAY2), me);
}
} }
void JustSummoned(Creature* summoned) void JustSummoned(Creature* summoned)
@@ -242,12 +238,29 @@ public:
switch (MarkOfCorruption_Count) switch (MarkOfCorruption_Count)
{ {
case 0: mark_spell = SPELL_MARK_OF_CORRUPTION1; break; case 0:
case 1: mark_spell = SPELL_MARK_OF_CORRUPTION2; break; mark_spell = SPELL_MARK_OF_CORRUPTION1;
case 2: mark_spell = SPELL_MARK_OF_CORRUPTION3; break; break;
case 3: mark_spell = SPELL_MARK_OF_CORRUPTION4; break;
case 4: mark_spell = SPELL_MARK_OF_CORRUPTION5; break; case 1:
case 5: mark_spell = SPELL_MARK_OF_CORRUPTION6; break; mark_spell = SPELL_MARK_OF_CORRUPTION2;
break;
case 2:
mark_spell = SPELL_MARK_OF_CORRUPTION3;
break;
case 3:
mark_spell = SPELL_MARK_OF_CORRUPTION4;
break;
case 4:
mark_spell = SPELL_MARK_OF_CORRUPTION5;
break;
case 5:
mark_spell = SPELL_MARK_OF_CORRUPTION6;
break;
} }
DoCast(me->getVictim(), mark_spell); DoCast(me->getVictim(), mark_spell);
@@ -309,12 +322,29 @@ public:
switch (MarkOfHydross_Count) switch (MarkOfHydross_Count)
{ {
case 0: mark_spell = SPELL_MARK_OF_HYDROSS1; break; case 0:
case 1: mark_spell = SPELL_MARK_OF_HYDROSS2; break; mark_spell = SPELL_MARK_OF_HYDROSS1;
case 2: mark_spell = SPELL_MARK_OF_HYDROSS3; break; break;
case 3: mark_spell = SPELL_MARK_OF_HYDROSS4; break;
case 4: mark_spell = SPELL_MARK_OF_HYDROSS5; break; case 1:
case 5: mark_spell = SPELL_MARK_OF_HYDROSS6; break; mark_spell = SPELL_MARK_OF_HYDROSS2;
break;
case 2:
mark_spell = SPELL_MARK_OF_HYDROSS3;
break;
case 3:
mark_spell = SPELL_MARK_OF_HYDROSS4;
break;
case 4:
mark_spell = SPELL_MARK_OF_HYDROSS5;
break;
case 5:
mark_spell = SPELL_MARK_OF_HYDROSS6;
break;
} }
DoCast(me->getVictim(), mark_spell); DoCast(me->getVictim(), mark_spell);
@@ -375,7 +405,6 @@ public:
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
}; };
}; };
void AddSC_boss_hydross_the_unstable() void AddSC_boss_hydross_the_unstable()
@@ -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);
@@ -130,8 +130,13 @@ public:
{ {
switch (urand(0, 1)) switch (urand(0, 1))
{ {
case 0: target->CastSpell(target, SPELL_MAGNETIC_PULL, true, NULL, NULL, me->GetGUID()); break; case 0:
case 1: target->CastSpell(target, SPELL_KNOCK_BACK, true, NULL, NULL, me->GetGUID()); break; target->CastSpell(target, SPELL_MAGNETIC_PULL, true, NULL, NULL, me->GetGUID());
break;
case 1:
target->CastSpell(target, SPELL_KNOCK_BACK, true, NULL, NULL, me->GetGUID());
break;
} }
} }
} }
@@ -137,12 +137,18 @@ public:
switch (type) switch (type)
{ {
case DATA_MAULGAREVENT: case DATA_MAULGAREVENT:
if (data == DONE) HandleGameObject(MaulgarDoor, true); if (data == DONE)
m_auiEncounter[0] = data; break; HandleGameObject(MaulgarDoor, true);
m_auiEncounter[0] = data;
break;
case DATA_GRUULEVENT: case DATA_GRUULEVENT:
if (data == IN_PROGRESS) HandleGameObject(GruulDoor, false); if (data == IN_PROGRESS)
else HandleGameObject(GruulDoor, true); HandleGameObject(GruulDoor, false);
m_auiEncounter[1] = data; break; else
HandleGameObject(GruulDoor, true);
m_auiEncounter[1] = data;
break;
} }
if (data == DONE) if (data == DONE)
@@ -103,15 +103,41 @@ class instance_arcatraz : public InstanceMapScript
{ {
switch (go->GetEntry()) switch (go->GetEntry())
{ {
case CONTAINMENT_CORE_SECURITY_FIELD_ALPHA: Containment_Core_Security_Field_AlphaGUID = go->GetGUID(); break; case CONTAINMENT_CORE_SECURITY_FIELD_ALPHA:
case CONTAINMENT_CORE_SECURITY_FIELD_BETA: Containment_Core_Security_Field_BetaGUID = go->GetGUID(); break; Containment_Core_Security_Field_AlphaGUID = go->GetGUID();
case POD_ALPHA: Pod_AlphaGUID = go->GetGUID(); break; break;
case POD_GAMMA: Pod_GammaGUID = go->GetGUID(); break;
case POD_BETA: Pod_BetaGUID = go->GetGUID(); break; case CONTAINMENT_CORE_SECURITY_FIELD_BETA:
case POD_DELTA: Pod_DeltaGUID = go->GetGUID(); break; Containment_Core_Security_Field_BetaGUID = go->GetGUID();
case POD_OMEGA: Pod_OmegaGUID = go->GetGUID(); break; break;
case SEAL_SPHERE: GoSphereGUID = go->GetGUID(); break;
//case WARDENS_SHIELD: Wardens_ShieldGUID = go->GetGUID(); break; case POD_ALPHA:
Pod_AlphaGUID = go->GetGUID();
break;
case POD_GAMMA:
Pod_GammaGUID = go->GetGUID();
break;
case POD_BETA:
Pod_BetaGUID = go->GetGUID();
break;
case POD_DELTA:
Pod_DeltaGUID = go->GetGUID();
break;
case POD_OMEGA:
Pod_OmegaGUID = go->GetGUID();
break;
case SEAL_SPHERE:
GoSphereGUID = go->GetGUID();
break;
/*case WARDENS_SHIELD:
Wardens_ShieldGUID = go->GetGUID();
break;*/
} }
} }
@@ -790,20 +790,42 @@ class npc_simon_bunny : public CreatureScript
{ {
switch (go->GetGOInfo()->displayId) switch (go->GetGOInfo()->displayId)
{ {
case GO_BLUE_CLUSTER_DISPLAY_LARGE: clusterIds[SIMON_BLUE] = go->GetEntry(); break; case GO_BLUE_CLUSTER_DISPLAY_LARGE:
case GO_RED_CLUSTER_DISPLAY_LARGE: clusterIds[SIMON_RED] = go->GetEntry(); break; clusterIds[SIMON_BLUE] = go->GetEntry();
case GO_GREEN_CLUSTER_DISPLAY_LARGE: clusterIds[SIMON_GREEN] = go->GetEntry(); break; break;
case GO_YELLOW_CLUSTER_DISPLAY_LARGE: clusterIds[SIMON_YELLOW] = go->GetEntry(); break;
case GO_RED_CLUSTER_DISPLAY_LARGE:
clusterIds[SIMON_RED] = go->GetEntry();
break;
case GO_GREEN_CLUSTER_DISPLAY_LARGE:
clusterIds[SIMON_GREEN] = go->GetEntry();
break;
case GO_YELLOW_CLUSTER_DISPLAY_LARGE:
clusterIds[SIMON_YELLOW] = go->GetEntry();
break;
} }
} }
else else
{ {
switch (go->GetGOInfo()->displayId) switch (go->GetGOInfo()->displayId)
{ {
case GO_BLUE_CLUSTER_DISPLAY: clusterIds[SIMON_BLUE] = go->GetEntry(); break; case GO_BLUE_CLUSTER_DISPLAY:
case GO_RED_CLUSTER_DISPLAY: clusterIds[SIMON_RED] = go->GetEntry(); break; clusterIds[SIMON_BLUE] = go->GetEntry();
case GO_GREEN_CLUSTER_DISPLAY: clusterIds[SIMON_GREEN] = go->GetEntry(); break; break;
case GO_YELLOW_CLUSTER_DISPLAY: clusterIds[SIMON_YELLOW] = go->GetEntry(); break;
case GO_RED_CLUSTER_DISPLAY:
clusterIds[SIMON_RED] = go->GetEntry();
break;
case GO_GREEN_CLUSTER_DISPLAY:
clusterIds[SIMON_GREEN] = go->GetEntry();
break;
case GO_YELLOW_CLUSTER_DISPLAY:
clusterIds[SIMON_YELLOW] = go->GetEntry();
break;
} }
} }
} }
@@ -252,8 +252,13 @@ class AreaTrigger_at_sholazar_waygate : public AreaTriggerScript
{ {
switch (trigger->id) switch (trigger->id)
{ {
case AT_SHOLAZAR: player->CastSpell(player, SPELL_SHOLAZAR_TO_UNGORO_TELEPORT, false); break; case AT_SHOLAZAR:
case AT_UNGORO: player->CastSpell(player, SPELL_UNGORO_TO_SHOLAZAR_TELEPORT, false); break; player->CastSpell(player, SPELL_SHOLAZAR_TO_UNGORO_TELEPORT, false);
break;
case AT_UNGORO:
player->CastSpell(player, SPELL_UNGORO_TO_SHOLAZAR_TELEPORT, false);
break;
} }
} }
+19 -5
View File
@@ -195,12 +195,26 @@ public:
{ {
switch (emote) switch (emote)
{ {
case TEXT_EMOTE_KISS: me->HandleEmoteCommand(EMOTE_ONESHOT_BOW); break; case TEXT_EMOTE_KISS:
case TEXT_EMOTE_WAVE: me->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); break; me->HandleEmoteCommand(EMOTE_ONESHOT_BOW);
case TEXT_EMOTE_SALUTE: me->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE); break; break;
case TEXT_EMOTE_SHY: me->HandleEmoteCommand(EMOTE_ONESHOT_FLEX); break;
case TEXT_EMOTE_WAVE:
me->HandleEmoteCommand(EMOTE_ONESHOT_WAVE);
break;
case TEXT_EMOTE_SALUTE:
me->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE);
break;
case TEXT_EMOTE_SHY:
me->HandleEmoteCommand(EMOTE_ONESHOT_FLEX);
break;
case TEXT_EMOTE_RUDE: case TEXT_EMOTE_RUDE:
case TEXT_EMOTE_CHICKEN: me->HandleEmoteCommand(EMOTE_ONESHOT_POINT); break; case TEXT_EMOTE_CHICKEN:
me->HandleEmoteCommand(EMOTE_ONESHOT_POINT);
break;
} }
} }
+2 -1
View File
@@ -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);
+69 -31
View File
@@ -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();
} }