Core: Cleaning up hungarian notation - Phase2: pPlayer -> player
This commit is contained in:
@@ -65,9 +65,9 @@ class go_cat_figurine : public GameObjectScript
|
||||
public:
|
||||
go_cat_figurine() : GameObjectScript("go_cat_figurine") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* /*pGO*/)
|
||||
bool OnGossipHello(Player* player, GameObject* /*pGO*/)
|
||||
{
|
||||
pPlayer->CastSpell(pPlayer, SPELL_SUMMON_GHOST_SABER, true);
|
||||
player->CastSpell(player, SPELL_SUMMON_GHOST_SABER, true);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@@ -80,16 +80,16 @@ class go_northern_crystal_pylon : public GameObjectScript
|
||||
public:
|
||||
go_northern_crystal_pylon() : GameObjectScript("go_northern_crystal_pylon") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
if (pGO->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
|
||||
{
|
||||
pPlayer->PrepareQuestMenu(pGO->GetGUID());
|
||||
pPlayer->SendPreparedQuest(pGO->GetGUID());
|
||||
player->PrepareQuestMenu(pGO->GetGUID());
|
||||
player->SendPreparedQuest(pGO->GetGUID());
|
||||
}
|
||||
|
||||
if (pPlayer->GetQuestStatus(4285) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->AreaExploredOrEventHappens(4285);
|
||||
if (player->GetQuestStatus(4285) == QUEST_STATUS_INCOMPLETE)
|
||||
player->AreaExploredOrEventHappens(4285);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -100,16 +100,16 @@ class go_eastern_crystal_pylon : public GameObjectScript
|
||||
public:
|
||||
go_eastern_crystal_pylon() : GameObjectScript("go_eastern_crystal_pylon") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
if (pGO->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
|
||||
{
|
||||
pPlayer->PrepareQuestMenu(pGO->GetGUID());
|
||||
pPlayer->SendPreparedQuest(pGO->GetGUID());
|
||||
player->PrepareQuestMenu(pGO->GetGUID());
|
||||
player->SendPreparedQuest(pGO->GetGUID());
|
||||
}
|
||||
|
||||
if (pPlayer->GetQuestStatus(4287) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->AreaExploredOrEventHappens(4287);
|
||||
if (player->GetQuestStatus(4287) == QUEST_STATUS_INCOMPLETE)
|
||||
player->AreaExploredOrEventHappens(4287);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -120,16 +120,16 @@ class go_western_crystal_pylon : public GameObjectScript
|
||||
public:
|
||||
go_western_crystal_pylon() : GameObjectScript("go_western_crystal_pylon") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
if (pGO->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
|
||||
{
|
||||
pPlayer->PrepareQuestMenu(pGO->GetGUID());
|
||||
pPlayer->SendPreparedQuest(pGO->GetGUID());
|
||||
player->PrepareQuestMenu(pGO->GetGUID());
|
||||
player->SendPreparedQuest(pGO->GetGUID());
|
||||
}
|
||||
|
||||
if (pPlayer->GetQuestStatus(4288) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->AreaExploredOrEventHappens(4288);
|
||||
if (player->GetQuestStatus(4288) == QUEST_STATUS_INCOMPLETE)
|
||||
player->AreaExploredOrEventHappens(4288);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -144,11 +144,11 @@ class go_barov_journal : public GameObjectScript
|
||||
public:
|
||||
go_barov_journal() : GameObjectScript("go_barov_journal") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* /*pGO*/)
|
||||
bool OnGossipHello(Player* player, GameObject* /*pGO*/)
|
||||
{
|
||||
if (pPlayer->HasSkill(SKILL_TAILORING) && pPlayer->GetBaseSkillValue(SKILL_TAILORING) >= 280 && !pPlayer->HasSpell(26086))
|
||||
if (player->HasSkill(SKILL_TAILORING) && player->GetBaseSkillValue(SKILL_TAILORING) >= 280 && !player->HasSpell(26086))
|
||||
{
|
||||
pPlayer->CastSpell(pPlayer, 26095, false);
|
||||
player->CastSpell(player, 26095, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -163,11 +163,11 @@ class go_field_repair_bot_74A : public GameObjectScript
|
||||
public:
|
||||
go_field_repair_bot_74A() : GameObjectScript("go_field_repair_bot_74A") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* /*pGO*/)
|
||||
bool OnGossipHello(Player* player, GameObject* /*pGO*/)
|
||||
{
|
||||
if (pPlayer->HasSkill(SKILL_ENGINERING) && pPlayer->GetBaseSkillValue(SKILL_ENGINERING) >= 300 && !pPlayer->HasSpell(22704))
|
||||
if (player->HasSkill(SKILL_ENGINERING) && player->GetBaseSkillValue(SKILL_ENGINERING) >= 300 && !player->HasSpell(22704))
|
||||
{
|
||||
pPlayer->CastSpell(pPlayer, 22864, false);
|
||||
player->CastSpell(player, 22864, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -187,14 +187,14 @@ class go_gilded_brazier : public GameObjectScript
|
||||
public:
|
||||
go_gilded_brazier() : GameObjectScript("go_gilded_brazier") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
if (pGO->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
|
||||
{
|
||||
if (pPlayer->GetQuestStatus(9678) == QUEST_STATUS_INCOMPLETE)
|
||||
if (player->GetQuestStatus(9678) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
if (Creature* Stillblade = pPlayer->SummonCreature(NPC_STILLBLADE, 8106.11f, -7542.06f, 151.775f, 3.02598f, TEMPSUMMON_DEAD_DESPAWN, 60000))
|
||||
Stillblade->AI()->AttackStart(pPlayer);
|
||||
if (Creature* Stillblade = player->SummonCreature(NPC_STILLBLADE, 8106.11f, -7542.06f, 151.775f, 3.02598f, TEMPSUMMON_DEAD_DESPAWN, 60000))
|
||||
Stillblade->AI()->AttackStart(player);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -210,10 +210,10 @@ class go_orb_of_command : public GameObjectScript
|
||||
public:
|
||||
go_orb_of_command() : GameObjectScript("go_orb_of_command") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* /*pGO*/)
|
||||
bool OnGossipHello(Player* player, GameObject* /*pGO*/)
|
||||
{
|
||||
if (pPlayer->GetQuestRewardStatus(7761))
|
||||
pPlayer->CastSpell(pPlayer, 23460, true);
|
||||
if (player->GetQuestRewardStatus(7761))
|
||||
player->CastSpell(player, 23460, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -228,11 +228,11 @@ class go_tablet_of_madness : public GameObjectScript
|
||||
public:
|
||||
go_tablet_of_madness() : GameObjectScript("go_tablet_of_madness") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* /*pGO*/)
|
||||
bool OnGossipHello(Player* player, GameObject* /*pGO*/)
|
||||
{
|
||||
if (pPlayer->HasSkill(SKILL_ALCHEMY) && pPlayer->GetSkillValue(SKILL_ALCHEMY) >= 300 && !pPlayer->HasSpell(24266))
|
||||
if (player->HasSkill(SKILL_ALCHEMY) && player->GetSkillValue(SKILL_ALCHEMY) >= 300 && !player->HasSpell(24266))
|
||||
{
|
||||
pPlayer->CastSpell(pPlayer, 24267, false);
|
||||
player->CastSpell(player, 24267, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -248,13 +248,13 @@ public:
|
||||
go_tablet_of_the_seven() : GameObjectScript("go_tablet_of_the_seven") { }
|
||||
|
||||
//TODO: use gossip option ("Transcript the Tablet") instead, if Trinity adds support.
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
if (pGO->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER)
|
||||
return true;
|
||||
|
||||
if (pPlayer->GetQuestStatus(4296) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->CastSpell(pPlayer, 15065, false);
|
||||
if (player->GetQuestStatus(4296) == QUEST_STATUS_INCOMPLETE)
|
||||
player->CastSpell(player, 15065, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -269,10 +269,10 @@ class go_jump_a_tron : public GameObjectScript
|
||||
public:
|
||||
go_jump_a_tron() : GameObjectScript("go_jump_a_tron") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* /*pGO*/)
|
||||
bool OnGossipHello(Player* player, GameObject* /*pGO*/)
|
||||
{
|
||||
if (pPlayer->GetQuestStatus(10111) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->CastSpell(pPlayer, 33382, true);
|
||||
if (player->GetQuestStatus(10111) == QUEST_STATUS_INCOMPLETE)
|
||||
player->CastSpell(player, 33382, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -303,15 +303,15 @@ class go_ethereum_prison : public GameObjectScript
|
||||
public:
|
||||
go_ethereum_prison() : GameObjectScript("go_ethereum_prison") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
int Random = rand() % (sizeof(NpcPrisonEntry) / sizeof(uint32));
|
||||
|
||||
if (Creature* creature = pPlayer->SummonCreature(NpcPrisonEntry[Random],
|
||||
pGO->GetPositionX(), pGO->GetPositionY(), pGO->GetPositionZ(), pGO->GetAngle(pPlayer),
|
||||
if (Creature* creature = player->SummonCreature(NpcPrisonEntry[Random],
|
||||
pGO->GetPositionX(), pGO->GetPositionY(), pGO->GetPositionZ(), pGO->GetAngle(player),
|
||||
TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
|
||||
{
|
||||
if (!creature->IsHostileTo(pPlayer))
|
||||
if (!creature->IsHostileTo(player))
|
||||
{
|
||||
uint32 Spell = 0;
|
||||
|
||||
@@ -328,7 +328,7 @@ public:
|
||||
}
|
||||
|
||||
if (Spell)
|
||||
creature->CastSpell(pPlayer, Spell, false);
|
||||
creature->CastSpell(player, Spell, false);
|
||||
else
|
||||
sLog->outError("TSCR: go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", creature->GetEntry(), creature->getFaction());
|
||||
}
|
||||
@@ -353,12 +353,12 @@ class go_ethereum_stasis : public GameObjectScript
|
||||
public:
|
||||
go_ethereum_stasis() : GameObjectScript("go_ethereum_stasis") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
int Random = rand() % (sizeof(NpcStasisEntry) / sizeof(uint32));
|
||||
|
||||
pPlayer->SummonCreature(NpcStasisEntry[Random],
|
||||
pGO->GetPositionX(), pGO->GetPositionY(), pGO->GetPositionZ(), pGO->GetAngle(pPlayer),
|
||||
player->SummonCreature(NpcStasisEntry[Random],
|
||||
pGO->GetPositionX(), pGO->GetPositionY(), pGO->GetPositionZ(), pGO->GetAngle(player),
|
||||
TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
|
||||
return false;
|
||||
@@ -379,7 +379,7 @@ class go_resonite_cask : public GameObjectScript
|
||||
public:
|
||||
go_resonite_cask() : GameObjectScript("go_resonite_cask") { }
|
||||
|
||||
bool OnGossipHello(Player* /*pPlayer*/, GameObject* pGO)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* pGO)
|
||||
{
|
||||
if (pGO->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
|
||||
pGO->SummonCreature(NPC_GOGGEROC, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000);
|
||||
@@ -399,10 +399,10 @@ class go_sacred_fire_of_life : public GameObjectScript
|
||||
public:
|
||||
go_sacred_fire_of_life() : GameObjectScript("go_sacred_fire_of_life") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
if (pGO->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
|
||||
pPlayer->SummonCreature(NPC_ARIKARA, -5008.338f, -2118.894f, 83.657f, 0.874f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
player->SummonCreature(NPC_ARIKARA, -5008.338f, -2118.894f, 83.657f, 0.874f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -427,7 +427,7 @@ class go_shrine_of_the_birds : public GameObjectScript
|
||||
public:
|
||||
go_shrine_of_the_birds() : GameObjectScript("go_shrine_of_the_birds") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
uint32 BirdEntry = 0;
|
||||
|
||||
@@ -448,7 +448,7 @@ public:
|
||||
}
|
||||
|
||||
if (BirdEntry)
|
||||
pPlayer->SummonCreature(BirdEntry, fX, fY, fZ, pGO->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
|
||||
player->SummonCreature(BirdEntry, fX, fY, fZ, pGO->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -470,13 +470,13 @@ class go_southfury_moonstone : public GameObjectScript
|
||||
public:
|
||||
go_southfury_moonstone() : GameObjectScript("go_southfury_moonstone") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* /*pGO*/)
|
||||
bool OnGossipHello(Player* player, GameObject* /*pGO*/)
|
||||
{
|
||||
//implicitTarget=48 not implemented as of writing this code, and manual summon may be just ok for our purpose
|
||||
//pPlayer->CastSpell(pPlayer, SPELL_SUMMON_RIZZLE, false);
|
||||
//player->CastSpell(player, SPELL_SUMMON_RIZZLE, false);
|
||||
|
||||
if (Creature* creature = pPlayer->SummonCreature(NPC_RIZZLE, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0))
|
||||
creature->CastSpell(pPlayer, SPELL_BLACKJACK, false);
|
||||
if (Creature* creature = player->SummonCreature(NPC_RIZZLE, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0))
|
||||
creature->CastSpell(player, SPELL_BLACKJACK, false);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -498,14 +498,14 @@ class go_tele_to_dalaran_crystal : public GameObjectScript
|
||||
public:
|
||||
go_tele_to_dalaran_crystal() : GameObjectScript("go_tele_to_dalaran_crystal") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* /*pGO*/)
|
||||
bool OnGossipHello(Player* player, GameObject* /*pGO*/)
|
||||
{
|
||||
if (pPlayer->GetQuestRewardStatus(QUEST_TELE_CRYSTAL_FLAG))
|
||||
if (player->GetQuestRewardStatus(QUEST_TELE_CRYSTAL_FLAG))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
pPlayer->GetSession()->SendNotification(GO_TELE_TO_DALARAN_CRYSTAL_FAILED);
|
||||
player->GetSession()->SendNotification(GO_TELE_TO_DALARAN_CRYSTAL_FAILED);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -520,9 +520,9 @@ class go_tele_to_violet_stand : public GameObjectScript
|
||||
public:
|
||||
go_tele_to_violet_stand() : GameObjectScript("go_tele_to_violet_stand") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* /*pGO*/)
|
||||
bool OnGossipHello(Player* player, GameObject* /*pGO*/)
|
||||
{
|
||||
if (pPlayer->GetQuestRewardStatus(QUEST_LEARN_LEAVE_RETURN) || pPlayer->GetQuestStatus(QUEST_LEARN_LEAVE_RETURN) == QUEST_STATUS_INCOMPLETE)
|
||||
if (player->GetQuestRewardStatus(QUEST_LEARN_LEAVE_RETURN) || player->GetQuestStatus(QUEST_LEARN_LEAVE_RETURN) == QUEST_STATUS_INCOMPLETE)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -550,38 +550,38 @@ class go_fel_crystalforge : public GameObjectScript
|
||||
public:
|
||||
go_fel_crystalforge() : GameObjectScript("go_fel_crystalforge") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
if (pGO->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) /* != GAMEOBJECT_TYPE_QUESTGIVER) */
|
||||
pPlayer->PrepareQuestMenu(pGO->GetGUID()); /* return true*/
|
||||
player->PrepareQuestMenu(pGO->GetGUID()); /* return true*/
|
||||
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_TEXT, pGO->GetGUID());
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_TEXT, pGO->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* pPlayer, GameObject* pGO, uint32 /*uiSender*/, uint32 uiAction)
|
||||
bool OnGossipSelect(Player* player, GameObject* pGO, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
pPlayer->PlayerTalkClass->ClearMenus();
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch(uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF:
|
||||
pPlayer->CastSpell(pPlayer, SPELL_CREATE_1_FLASK_OF_BEAST, false);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_RETURN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_ITEM_TEXT_RETURN, pGO->GetGUID());
|
||||
player->CastSpell(player, SPELL_CREATE_1_FLASK_OF_BEAST, false);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_RETURN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_ITEM_TEXT_RETURN, pGO->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
pPlayer->CastSpell(pPlayer, SPELL_CREATE_5_FLASK_OF_BEAST, false);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_RETURN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_ITEM_TEXT_RETURN, pGO->GetGUID());
|
||||
player->CastSpell(player, SPELL_CREATE_5_FLASK_OF_BEAST, false);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_RETURN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_ITEM_TEXT_RETURN, pGO->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_TEXT, pGO->GetGUID());
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_TEXT, pGO->GetGUID());
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
@@ -609,38 +609,38 @@ class go_bashir_crystalforge : public GameObjectScript
|
||||
public:
|
||||
go_bashir_crystalforge() : GameObjectScript("go_bashir_crystalforge") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
if (pGO->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) /* != GAMEOBJECT_TYPE_QUESTGIVER) */
|
||||
pPlayer->PrepareQuestMenu(pGO->GetGUID()); /* return true*/
|
||||
player->PrepareQuestMenu(pGO->GetGUID()); /* return true*/
|
||||
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_BASHIR_CRYSTALFORGE_TEXT, pGO->GetGUID());
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_BASHIR_CRYSTALFORGE_TEXT, pGO->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* pPlayer, GameObject* pGO, uint32 /*uiSender*/, uint32 uiAction)
|
||||
bool OnGossipSelect(Player* player, GameObject* pGO, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
pPlayer->PlayerTalkClass->ClearMenus();
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch(uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF:
|
||||
pPlayer->CastSpell(pPlayer, SPELL_CREATE_1_FLASK_OF_SORCERER, false);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_RETURN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_BASHIR_CRYSTALFORGE_ITEM_TEXT_RETURN, pGO->GetGUID());
|
||||
player->CastSpell(player, SPELL_CREATE_1_FLASK_OF_SORCERER, false);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_RETURN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_BASHIR_CRYSTALFORGE_ITEM_TEXT_RETURN, pGO->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
pPlayer->CastSpell(pPlayer, SPELL_CREATE_5_FLASK_OF_SORCERER, false);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_RETURN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_BASHIR_CRYSTALFORGE_ITEM_TEXT_RETURN, pGO->GetGUID());
|
||||
player->CastSpell(player, SPELL_CREATE_5_FLASK_OF_SORCERER, false);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_RETURN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_BASHIR_CRYSTALFORGE_ITEM_TEXT_RETURN, pGO->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_BASHIR_CRYSTALFORGE_TEXT, pGO->GetGUID());
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BASHIR_CRYSTALFORGE_ITEM_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_BASHIR_CRYSTALFORGE_TEXT, pGO->GetGUID());
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
@@ -673,36 +673,36 @@ class go_matrix_punchograph : public GameObjectScript
|
||||
public:
|
||||
go_matrix_punchograph() : GameObjectScript("go_matrix_punchograph") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
switch(pGO->GetEntry())
|
||||
{
|
||||
case MATRIX_PUNCHOGRAPH_3005_A:
|
||||
if (pPlayer->HasItemCount(ITEM_WHITE_PUNCH_CARD, 1))
|
||||
if (player->HasItemCount(ITEM_WHITE_PUNCH_CARD, 1))
|
||||
{
|
||||
pPlayer->DestroyItemCount(ITEM_WHITE_PUNCH_CARD, 1, true);
|
||||
pPlayer->CastSpell(pPlayer, SPELL_YELLOW_PUNCH_CARD, true);
|
||||
player->DestroyItemCount(ITEM_WHITE_PUNCH_CARD, 1, true);
|
||||
player->CastSpell(player, SPELL_YELLOW_PUNCH_CARD, true);
|
||||
}
|
||||
break;
|
||||
case MATRIX_PUNCHOGRAPH_3005_B:
|
||||
if (pPlayer->HasItemCount(ITEM_YELLOW_PUNCH_CARD, 1))
|
||||
if (player->HasItemCount(ITEM_YELLOW_PUNCH_CARD, 1))
|
||||
{
|
||||
pPlayer->DestroyItemCount(ITEM_YELLOW_PUNCH_CARD, 1, true);
|
||||
pPlayer->CastSpell(pPlayer, SPELL_BLUE_PUNCH_CARD, true);
|
||||
player->DestroyItemCount(ITEM_YELLOW_PUNCH_CARD, 1, true);
|
||||
player->CastSpell(player, SPELL_BLUE_PUNCH_CARD, true);
|
||||
}
|
||||
break;
|
||||
case MATRIX_PUNCHOGRAPH_3005_C:
|
||||
if (pPlayer->HasItemCount(ITEM_BLUE_PUNCH_CARD, 1))
|
||||
if (player->HasItemCount(ITEM_BLUE_PUNCH_CARD, 1))
|
||||
{
|
||||
pPlayer->DestroyItemCount(ITEM_BLUE_PUNCH_CARD, 1, true);
|
||||
pPlayer->CastSpell(pPlayer, SPELL_RED_PUNCH_CARD, true);
|
||||
player->DestroyItemCount(ITEM_BLUE_PUNCH_CARD, 1, true);
|
||||
player->CastSpell(player, SPELL_RED_PUNCH_CARD, true);
|
||||
}
|
||||
break;
|
||||
case MATRIX_PUNCHOGRAPH_3005_D:
|
||||
if (pPlayer->HasItemCount(ITEM_RED_PUNCH_CARD, 1))
|
||||
if (player->HasItemCount(ITEM_RED_PUNCH_CARD, 1))
|
||||
{
|
||||
pPlayer->DestroyItemCount(ITEM_RED_PUNCH_CARD, 1, true);
|
||||
pPlayer->CastSpell(pPlayer, SPELL_PRISMATIC_PUNCH_CARD, true);
|
||||
player->DestroyItemCount(ITEM_RED_PUNCH_CARD, 1, true);
|
||||
player->CastSpell(player, SPELL_PRISMATIC_PUNCH_CARD, true);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -726,12 +726,12 @@ class go_rusty_cage : public GameObjectScript
|
||||
public:
|
||||
go_rusty_cage() : GameObjectScript("go_rusty_cage") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
if (Creature* pGoblinPrisoner = pGO->FindNearestCreature(NPC_GOBLIN_PRISIONER, 5.0f, true))
|
||||
{
|
||||
pGO->SetGoState(GO_STATE_ACTIVE);
|
||||
pPlayer->KilledMonsterCredit(NPC_GOBLIN_PRISIONER, pGoblinPrisoner->GetGUID());
|
||||
player->KilledMonsterCredit(NPC_GOBLIN_PRISIONER, pGoblinPrisoner->GetGUID());
|
||||
pGoblinPrisoner->DisappearAndDie();
|
||||
}
|
||||
|
||||
@@ -753,12 +753,12 @@ class go_scourge_cage : public GameObjectScript
|
||||
public:
|
||||
go_scourge_cage() : GameObjectScript("go_scourge_cage") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
if (Creature* pNearestPrisoner = pGO->FindNearestCreature(NPC_SCOURGE_PRISONER, 5.0f, true))
|
||||
{
|
||||
pGO->SetGoState(GO_STATE_ACTIVE);
|
||||
pPlayer->KilledMonsterCredit(NPC_SCOURGE_PRISONER, pNearestPrisoner->GetGUID());
|
||||
player->KilledMonsterCredit(NPC_SCOURGE_PRISONER, pNearestPrisoner->GetGUID());
|
||||
pNearestPrisoner->DisappearAndDie();
|
||||
}
|
||||
|
||||
@@ -781,12 +781,12 @@ class go_arcane_prison : public GameObjectScript
|
||||
public:
|
||||
go_arcane_prison() : GameObjectScript("go_arcane_prison") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
if (pPlayer->GetQuestStatus(QUEST_PRISON_BREAK) == QUEST_STATUS_INCOMPLETE)
|
||||
if (player->GetQuestStatus(QUEST_PRISON_BREAK) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
pGO->SummonCreature(25318, 3485.089844f, 6115.7422188f, 70.966812f, 0, TEMPSUMMON_TIMED_DESPAWN, 60000);
|
||||
pPlayer->CastSpell(pPlayer, SPELL_ARCANE_PRISONER_KILL_CREDIT, true);
|
||||
player->CastSpell(player, SPELL_ARCANE_PRISONER_KILL_CREDIT, true);
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
@@ -804,10 +804,10 @@ class go_blood_filled_orb : public GameObjectScript
|
||||
public:
|
||||
go_blood_filled_orb() : GameObjectScript("go_blood_filled_orb") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
if (pGO->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
|
||||
pPlayer->SummonCreature(NPC_ZELEMAR, -369.746f, 166.759f, -21.50f, 5.235f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
player->SummonCreature(NPC_ZELEMAR, -369.746f, 166.759f, -21.50f, 5.235f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -835,7 +835,7 @@ class go_jotunheim_cage : public GameObjectScript
|
||||
public:
|
||||
go_jotunheim_cage() : GameObjectScript("go_jotunheim_cage") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
Creature* pPrisoner = pGO->FindNearestCreature(NPC_EBON_BLADE_PRISONER_HUMAN, 5.0f, true);
|
||||
if (!pPrisoner)
|
||||
@@ -852,20 +852,20 @@ public:
|
||||
return false;
|
||||
|
||||
pPrisoner->DisappearAndDie();
|
||||
pPlayer->KilledMonsterCredit(NPC_EBON_BLADE_PRISONER_HUMAN, 0);
|
||||
player->KilledMonsterCredit(NPC_EBON_BLADE_PRISONER_HUMAN, 0);
|
||||
switch(pPrisoner->GetEntry())
|
||||
{
|
||||
case NPC_EBON_BLADE_PRISONER_HUMAN:
|
||||
pPlayer->CastSpell(pPlayer, SPELL_SUMMON_BLADE_KNIGHT_H, true);
|
||||
player->CastSpell(player, SPELL_SUMMON_BLADE_KNIGHT_H, true);
|
||||
break;
|
||||
case NPC_EBON_BLADE_PRISONER_NE:
|
||||
pPlayer->CastSpell(pPlayer, SPELL_SUMMON_BLADE_KNIGHT_NE, true);
|
||||
player->CastSpell(player, SPELL_SUMMON_BLADE_KNIGHT_NE, true);
|
||||
break;
|
||||
case NPC_EBON_BLADE_PRISONER_TROLL:
|
||||
pPlayer->CastSpell(pPlayer, SPELL_SUMMON_BLADE_KNIGHT_TROLL, true);
|
||||
player->CastSpell(player, SPELL_SUMMON_BLADE_KNIGHT_TROLL, true);
|
||||
break;
|
||||
case NPC_EBON_BLADE_PRISONER_ORC:
|
||||
pPlayer->CastSpell(pPlayer, SPELL_SUMMON_BLADE_KNIGHT_ORC, true);
|
||||
player->CastSpell(player, SPELL_SUMMON_BLADE_KNIGHT_ORC, true);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
@@ -884,12 +884,12 @@ class go_table_theka : public GameObjectScript
|
||||
public:
|
||||
go_table_theka() : GameObjectScript("go_table_theka") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
if (pPlayer->GetQuestStatus(QUEST_SPIDER_GOLD) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->AreaExploredOrEventHappens(QUEST_SPIDER_GOLD);
|
||||
if (player->GetQuestStatus(QUEST_SPIDER_GOLD) == QUEST_STATUS_INCOMPLETE)
|
||||
player->AreaExploredOrEventHappens(QUEST_SPIDER_GOLD);
|
||||
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TABLE_THEKA, pGO->GetGUID());
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TABLE_THEKA, pGO->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -910,12 +910,12 @@ class go_inconspicuous_landmark : public GameObjectScript
|
||||
public:
|
||||
go_inconspicuous_landmark() : GameObjectScript("go_inconspicuous_landmark") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* /*pGO*/)
|
||||
bool OnGossipHello(Player* player, GameObject* /*pGO*/)
|
||||
{
|
||||
if (pPlayer->HasItemCount(ITEM_CUERGOS_KEY, 1))
|
||||
if (player->HasItemCount(ITEM_CUERGOS_KEY, 1))
|
||||
return false;
|
||||
|
||||
pPlayer->CastSpell(pPlayer, SPELL_SUMMON_PIRATES_TREASURE_AND_TRIGGER_MOB, true);
|
||||
player->CastSpell(player, SPELL_SUMMON_PIRATES_TREASURE_AND_TRIGGER_MOB, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -930,13 +930,13 @@ class go_soulwell : public GameObjectScript
|
||||
public:
|
||||
go_soulwell() : GameObjectScript("go_soulwell") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
Unit* caster = pGO->GetOwner();
|
||||
if (!caster || caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return true;
|
||||
|
||||
if (!pPlayer->IsInSameRaidWith(static_cast<Player* >(caster)))
|
||||
if (!player->IsInSameRaidWith(static_cast<Player* >(caster)))
|
||||
return true;
|
||||
|
||||
// Repeating this at every use is ugly and inefficient. But as long as we don't have proper
|
||||
@@ -961,7 +961,7 @@ public:
|
||||
}
|
||||
|
||||
pGO->AddUse();
|
||||
pPlayer->CastSpell(pPlayer, newSpell, true);
|
||||
player->CastSpell(player, newSpell, true);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -985,9 +985,9 @@ class go_dragonflayer_cage : public GameObjectScript
|
||||
public:
|
||||
go_dragonflayer_cage() : GameObjectScript("go_dragonflayer_cage") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
if (pPlayer->GetQuestStatus(QUEST_PRISONERS_OF_WYRMSKULL) != QUEST_STATUS_INCOMPLETE)
|
||||
if (player->GetQuestStatus(QUEST_PRISONERS_OF_WYRMSKULL) != QUEST_STATUS_INCOMPLETE)
|
||||
return true;
|
||||
|
||||
Creature* pPrisoner = pGO->FindNearestCreature(NPC_PRISONER_PRIEST, 2.0f);
|
||||
@@ -1009,7 +1009,7 @@ public:
|
||||
if (qInfo)
|
||||
{
|
||||
//TODO: prisoner should help player for a short period of time
|
||||
pPlayer->KilledMonsterCredit(qInfo->ReqCreatureOrGOId[0], 0);
|
||||
player->KilledMonsterCredit(qInfo->ReqCreatureOrGOId[0], 0);
|
||||
pPrisoner->DisappearAndDie();
|
||||
}
|
||||
return true;
|
||||
@@ -1032,16 +1032,16 @@ class go_tadpole_cage : public GameObjectScript
|
||||
public:
|
||||
go_tadpole_cage() : GameObjectScript("go_tadpole_cage") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
if (pPlayer->GetQuestStatus(QUEST_OH_NOES_THE_TADPOLES) == QUEST_STATUS_INCOMPLETE)
|
||||
if (player->GetQuestStatus(QUEST_OH_NOES_THE_TADPOLES) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
Creature* pTadpole = pGO->FindNearestCreature(NPC_WINTERFIN_TADPOLE, 1.0f);
|
||||
if (pTadpole)
|
||||
{
|
||||
pGO->UseDoorOrButton();
|
||||
pTadpole->DisappearAndDie();
|
||||
pPlayer->KilledMonsterCredit(NPC_WINTERFIN_TADPOLE, 0);
|
||||
player->KilledMonsterCredit(NPC_WINTERFIN_TADPOLE, 0);
|
||||
//FIX: Summon minion tadpole
|
||||
}
|
||||
}
|
||||
@@ -1067,10 +1067,10 @@ class go_black_cage : public GameObjectScript
|
||||
public:
|
||||
go_black_cage() : GameObjectScript("go_black_cage") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
if ((pPlayer->GetTeamId() == TEAM_ALLIANCE && pPlayer->GetQuestStatus(QUEST_ALLIANCE_YOU_VE_REALLY_DONE_IT_THIS_TIME_KUL) == QUEST_STATUS_INCOMPLETE) ||
|
||||
(pPlayer->GetTeamId() == TEAM_HORDE && pPlayer->GetQuestStatus(QUEST_HORDE_YOU_VE_REALLY_DONE_IT_THIS_TIME_KUL) == QUEST_STATUS_INCOMPLETE))
|
||||
if ((player->GetTeamId() == TEAM_ALLIANCE && player->GetQuestStatus(QUEST_ALLIANCE_YOU_VE_REALLY_DONE_IT_THIS_TIME_KUL) == QUEST_STATUS_INCOMPLETE) ||
|
||||
(player->GetTeamId() == TEAM_HORDE && player->GetQuestStatus(QUEST_HORDE_YOU_VE_REALLY_DONE_IT_THIS_TIME_KUL) == QUEST_STATUS_INCOMPLETE))
|
||||
{
|
||||
Creature* pPrisoner = pGO->FindNearestCreature(NPC_CAPTIVE_ASPIRANT, 1.0f);
|
||||
if (!pPrisoner)
|
||||
@@ -1079,7 +1079,7 @@ public:
|
||||
{
|
||||
pGO->UseDoorOrButton();
|
||||
pPrisoner->DisappearAndDie();
|
||||
pPlayer->KilledMonsterCredit(pPrisoner->GetEntry(), 0);
|
||||
player->KilledMonsterCredit(pPrisoner->GetEntry(), 0);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -1110,41 +1110,41 @@ class go_amberpine_outhouse : public GameObjectScript
|
||||
public:
|
||||
go_amberpine_outhouse() : GameObjectScript("go_amberpine_outhouse") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
QuestStatus status = pPlayer->GetQuestStatus(QUEST_DOING_YOUR_DUTY);
|
||||
QuestStatus status = player->GetQuestStatus(QUEST_DOING_YOUR_DUTY);
|
||||
if (status == QUEST_STATUS_INCOMPLETE || status == QUEST_STATUS_COMPLETE || status == QUEST_STATUS_REWARDED)
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_USE_OUTHOUSE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_OUTHOUSE_VACANT, pGO->GetGUID());
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_USE_OUTHOUSE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_OUTHOUSE_VACANT, pGO->GetGUID());
|
||||
return true;
|
||||
}
|
||||
else
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_OUTHOUSE_INUSE, pGO->GetGUID());
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_OUTHOUSE_INUSE, pGO->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* pPlayer, GameObject* pGO, uint32 /*uiSender*/, uint32 uiAction)
|
||||
bool OnGossipSelect(Player* player, GameObject* pGO, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
pPlayer->PlayerTalkClass->ClearMenus();
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
if (uiAction == GOSSIP_ACTION_INFO_DEF +1)
|
||||
{
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
Creature* pTarget = GetClosestCreatureWithEntry(pPlayer, NPC_OUTHOUSE_BUNNY, 3.0f);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
Creature* pTarget = GetClosestCreatureWithEntry(player, NPC_OUTHOUSE_BUNNY, 3.0f);
|
||||
if (pTarget)
|
||||
{
|
||||
pTarget->AI()->SetData(1, pPlayer->getGender());
|
||||
pTarget->AI()->SetData(1, player->getGender());
|
||||
pGO->CastSpell(pTarget, SPELL_INDISPOSED_III);
|
||||
}
|
||||
pGO->CastSpell(pPlayer, SPELL_INDISPOSED);
|
||||
if (pPlayer->HasItemCount(ITEM_ANDERHOLS_SLIDER_CIDER, 1))
|
||||
pGO->CastSpell(pPlayer, SPELL_CREATE_AMBERSEEDS);
|
||||
pGO->CastSpell(player, SPELL_INDISPOSED);
|
||||
if (player->HasItemCount(ITEM_ANDERHOLS_SLIDER_CIDER, 1))
|
||||
pGO->CastSpell(player, SPELL_CREATE_AMBERSEEDS);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->GetSession()->SendNotification(GO_ANDERHOLS_SLIDER_CIDER_NOT_FOUND);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->GetSession()->SendNotification(GO_ANDERHOLS_SLIDER_CIDER_NOT_FOUND);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1165,11 +1165,11 @@ class go_hive_pod : public GameObjectScript
|
||||
public:
|
||||
go_hive_pod() : GameObjectScript("go_hive_pod") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
pPlayer->SendLoot(pGO->GetGUID(), LOOT_CORPSE);
|
||||
pGO->SummonCreature(NPC_HIVE_AMBUSHER, pGO->GetPositionX()+1, pGO->GetPositionY(), pGO->GetPositionZ(), pGO->GetAngle(pPlayer), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
|
||||
pGO->SummonCreature(NPC_HIVE_AMBUSHER, pGO->GetPositionX(), pGO->GetPositionY()+1, pGO->GetPositionZ(), pGO->GetAngle(pPlayer), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
|
||||
player->SendLoot(pGO->GetGUID(), LOOT_CORPSE);
|
||||
pGO->SummonCreature(NPC_HIVE_AMBUSHER, pGO->GetPositionX()+1, pGO->GetPositionY(), pGO->GetPositionZ(), pGO->GetAngle(player), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
|
||||
pGO->SummonCreature(NPC_HIVE_AMBUSHER, pGO->GetPositionX(), pGO->GetPositionY()+1, pGO->GetPositionZ(), pGO->GetAngle(player), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -1179,7 +1179,7 @@ class go_massive_seaforium_charge : public GameObjectScript
|
||||
public:
|
||||
go_massive_seaforium_charge() : GameObjectScript("go_massive_seaforium_charge") { }
|
||||
|
||||
bool OnGossipHello(Player* /*pPlayer*/, GameObject* pGo)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* pGo)
|
||||
{
|
||||
pGo->SetLootState(GO_JUST_DEACTIVATED);
|
||||
return true;
|
||||
|
||||
@@ -48,7 +48,7 @@ class item_only_for_flight : public ItemScript
|
||||
public:
|
||||
item_only_for_flight() : ItemScript("item_only_for_flight") { }
|
||||
|
||||
bool OnUse(Player* pPlayer, Item* pItem, SpellCastTargets const& /*targets*/)
|
||||
bool OnUse(Player* player, Item* pItem, SpellCastTargets const& /*targets*/)
|
||||
{
|
||||
uint32 itemId = pItem->GetEntry();
|
||||
bool disabled = false;
|
||||
@@ -57,25 +57,25 @@ public:
|
||||
switch(itemId)
|
||||
{
|
||||
case 24538:
|
||||
if (pPlayer->GetAreaId() != 3628)
|
||||
if (player->GetAreaId() != 3628)
|
||||
disabled = true;
|
||||
break;
|
||||
case 34489:
|
||||
if (pPlayer->GetZoneId() != 4080)
|
||||
if (player->GetZoneId() != 4080)
|
||||
disabled = true;
|
||||
break;
|
||||
case 34475:
|
||||
if (const SpellEntry* pSpellInfo = GetSpellStore()->LookupEntry(SPELL_ARCANE_CHARGES))
|
||||
Spell::SendCastResult(pPlayer, pSpellInfo, 1, SPELL_FAILED_NOT_ON_GROUND);
|
||||
Spell::SendCastResult(player, pSpellInfo, 1, SPELL_FAILED_NOT_ON_GROUND);
|
||||
break;
|
||||
}
|
||||
|
||||
// allow use in flight only
|
||||
if (pPlayer->isInFlight() && !disabled)
|
||||
if (player->isInFlight() && !disabled)
|
||||
return false;
|
||||
|
||||
// error
|
||||
pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pItem, NULL);
|
||||
player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pItem, NULL);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -91,28 +91,28 @@ public:
|
||||
|
||||
//This is just a hack and should be removed from here.
|
||||
//Creature/Item are in fact created before spell are sucessfully casted, without any checks at all to ensure proper/expected behavior.
|
||||
bool OnUse(Player* pPlayer, Item* /*pItem*/, SpellCastTargets const& /*targets*/)
|
||||
bool OnUse(Player* player, Item* /*pItem*/, SpellCastTargets const& /*targets*/)
|
||||
{
|
||||
if (pPlayer->GetQuestStatus(9452) == QUEST_STATUS_INCOMPLETE)
|
||||
if (player->GetQuestStatus(9452) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
if (urand(0, 99) < 35)
|
||||
{
|
||||
Creature* Murloc = pPlayer->SummonCreature(17102, pPlayer->GetPositionX(), pPlayer->GetPositionY()+20, pPlayer->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
Creature* Murloc = player->SummonCreature(17102, player->GetPositionX(), player->GetPositionY()+20, player->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Murloc)
|
||||
Murloc->AI()->AttackStart(pPlayer);
|
||||
Murloc->AI()->AttackStart(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint32 itemId = 23614;
|
||||
InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemId, 1);
|
||||
InventoryResult msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemId, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
{
|
||||
if (Item* item = pPlayer->StoreNewItem(dest, itemId, true))
|
||||
pPlayer->SendNewItem(item, 1, false, true);
|
||||
if (Item* item = player->StoreNewItem(dest, itemId, true))
|
||||
player->SendNewItem(item, 1, false, true);
|
||||
}
|
||||
else
|
||||
pPlayer->SendEquipError(msg, NULL, NULL, itemId);
|
||||
player->SendEquipError(msg, NULL, NULL, itemId);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -150,13 +150,13 @@ class item_gor_dreks_ointment : public ItemScript
|
||||
public:
|
||||
item_gor_dreks_ointment() : ItemScript("item_gor_dreks_ointment") { }
|
||||
|
||||
bool OnUse(Player* pPlayer, Item* pItem, SpellCastTargets const& targets)
|
||||
bool OnUse(Player* player, Item* pItem, SpellCastTargets const& targets)
|
||||
{
|
||||
if (targets.GetUnitTarget() && targets.GetUnitTarget()->GetTypeId() == TYPEID_UNIT &&
|
||||
targets.GetUnitTarget()->GetEntry() == 20748 && !targets.GetUnitTarget()->HasAura(32578))
|
||||
return false;
|
||||
|
||||
pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pItem, NULL);
|
||||
player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pItem, NULL);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -170,13 +170,13 @@ class item_incendiary_explosives : public ItemScript
|
||||
public:
|
||||
item_incendiary_explosives() : ItemScript("item_incendiary_explosives") { }
|
||||
|
||||
bool OnUse(Player* pPlayer, Item* pItem, SpellCastTargets const & /*targets*/)
|
||||
bool OnUse(Player* player, Item* pItem, SpellCastTargets const & /*targets*/)
|
||||
{
|
||||
if (pPlayer->FindNearestCreature(26248, 15) || pPlayer->FindNearestCreature(26249, 15))
|
||||
if (player->FindNearestCreature(26248, 15) || player->FindNearestCreature(26249, 15))
|
||||
return false;
|
||||
else
|
||||
{
|
||||
pPlayer->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, pItem, NULL);
|
||||
player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, pItem, NULL);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -190,12 +190,12 @@ class item_mysterious_egg : public ItemScript
|
||||
{
|
||||
public:
|
||||
item_mysterious_egg() : ItemScript("item_mysterious_egg") { }
|
||||
bool OnExpire(Player* pPlayer, ItemTemplate const* /*pItemProto*/)
|
||||
bool OnExpire(Player* player, ItemTemplate const* /*pItemProto*/)
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 39883, 1); // Cracked Egg
|
||||
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 39883, 1); // Cracked Egg
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
pPlayer->StoreNewItem(dest, 39883, true, Item::GenerateItemRandomPropertyId(39883));
|
||||
player->StoreNewItem(dest, 39883, true, Item::GenerateItemRandomPropertyId(39883));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -210,12 +210,12 @@ class item_disgusting_jar : public ItemScript
|
||||
public:
|
||||
item_disgusting_jar() : ItemScript("item_disgusting_jar") {}
|
||||
|
||||
bool OnExpire(Player* pPlayer, ItemTemplate const* /*pItemProto*/)
|
||||
bool OnExpire(Player* player, ItemTemplate const* /*pItemProto*/)
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 44718, 1); // Ripe Disgusting Jar
|
||||
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 44718, 1); // Ripe Disgusting Jar
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
pPlayer->StoreNewItem(dest, 44718, true, Item::GenerateItemRandomPropertyId(44718));
|
||||
player->StoreNewItem(dest, 44718, true, Item::GenerateItemRandomPropertyId(44718));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -259,12 +259,12 @@ class item_pile_fake_furs : public ItemScript
|
||||
public:
|
||||
item_pile_fake_furs() : ItemScript("item_pile_fake_furs") { }
|
||||
|
||||
bool OnUse(Player* pPlayer, Item* /*pItem*/, SpellCastTargets const & /*targets*/)
|
||||
bool OnUse(Player* player, Item* /*pItem*/, SpellCastTargets const & /*targets*/)
|
||||
{
|
||||
GameObject* pGo = NULL;
|
||||
for (uint8 i = 0; i < CaribouTrapsNum; ++i)
|
||||
{
|
||||
pGo = pPlayer->FindNearestGameObject(CaribouTraps[i], 5.0f);
|
||||
pGo = player->FindNearestGameObject(CaribouTraps[i], 5.0f);
|
||||
if (pGo)
|
||||
break;
|
||||
}
|
||||
@@ -278,7 +278,7 @@ public:
|
||||
float x, y, z;
|
||||
pGo->GetClosePoint(x, y, z, pGo->GetObjectSize() / 3, 7.0f);
|
||||
pGo->SummonGameObject(GO_HIGH_QUALITY_FUR, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 0, 0, 0, 0, 0, 1000);
|
||||
if (TempSummon* summon = pPlayer->SummonCreature(NPC_NESINGWARY_TRAPPER, x, y, z, pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1000))
|
||||
if (TempSummon* summon = player->SummonCreature(NPC_NESINGWARY_TRAPPER, x, y, z, pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1000))
|
||||
{
|
||||
summon->SetVisible(false);
|
||||
summon->SetReactState(REACT_PASSIVE);
|
||||
@@ -304,17 +304,17 @@ class item_petrov_cluster_bombs : public ItemScript
|
||||
public:
|
||||
item_petrov_cluster_bombs() : ItemScript("item_petrov_cluster_bombs") { }
|
||||
|
||||
bool OnUse(Player* pPlayer, Item* pItem, const SpellCastTargets & /*pTargets*/)
|
||||
bool OnUse(Player* player, Item* pItem, const SpellCastTargets & /*pTargets*/)
|
||||
{
|
||||
if (pPlayer->GetZoneId() != ZONE_ID_HOWLING)
|
||||
if (player->GetZoneId() != ZONE_ID_HOWLING)
|
||||
return false;
|
||||
|
||||
if (!pPlayer->GetTransport() || pPlayer->GetAreaId() != AREA_ID_SHATTERED_STRAITS)
|
||||
if (!player->GetTransport() || player->GetAreaId() != AREA_ID_SHATTERED_STRAITS)
|
||||
{
|
||||
pPlayer->SendEquipError(EQUIP_ERR_NONE, pItem, NULL);
|
||||
player->SendEquipError(EQUIP_ERR_NONE, pItem, NULL);
|
||||
|
||||
if (const SpellEntry* pSpellInfo = GetSpellStore()->LookupEntry(SPELL_PETROV_BOMB))
|
||||
Spell::SendCastResult(pPlayer, pSpellInfo, 1, SPELL_FAILED_NOT_HERE);
|
||||
Spell::SendCastResult(player, pSpellInfo, 1, SPELL_FAILED_NOT_HERE);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -370,25 +370,25 @@ class item_dehta_trap_smasher : public ItemScript
|
||||
public:
|
||||
item_dehta_trap_smasher() : ItemScript("item_dehta_trap_smasher") { }
|
||||
|
||||
bool OnUse(Player* pPlayer, Item* /*pItem*/, const SpellCastTargets & /*pTargets*/)
|
||||
bool OnUse(Player* player, Item* /*pItem*/, const SpellCastTargets & /*pTargets*/)
|
||||
{
|
||||
if (pPlayer->GetQuestStatus(QUEST_CANNOT_HELP_THEMSELVES) != QUEST_STATUS_INCOMPLETE)
|
||||
if (player->GetQuestStatus(QUEST_CANNOT_HELP_THEMSELVES) != QUEST_STATUS_INCOMPLETE)
|
||||
return false;
|
||||
|
||||
Creature* pMammoth;
|
||||
pMammoth = pPlayer->FindNearestCreature(NPC_TRAPPED_MAMMOTH_CALF, 5.0f);
|
||||
pMammoth = player->FindNearestCreature(NPC_TRAPPED_MAMMOTH_CALF, 5.0f);
|
||||
if (!pMammoth)
|
||||
return false;
|
||||
|
||||
GameObject* pTrap;
|
||||
for (uint8 i = 0; i < MammothTrapsNum; ++i)
|
||||
{
|
||||
pTrap = pPlayer->FindNearestGameObject(MammothTraps[i], 11.0f);
|
||||
pTrap = player->FindNearestGameObject(MammothTraps[i], 11.0f);
|
||||
if (pTrap)
|
||||
{
|
||||
pMammoth->AI()->DoAction(1);
|
||||
pTrap->SetGoState(GO_STATE_READY);
|
||||
pPlayer->KilledMonsterCredit(NPC_TRAPPED_MAMMOTH_CALF, 0);
|
||||
player->KilledMonsterCredit(NPC_TRAPPED_MAMMOTH_CALF, 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -407,18 +407,18 @@ class item_trident_of_nazjan : public ItemScript
|
||||
public:
|
||||
item_trident_of_nazjan() : ItemScript("item_Trident_of_Nazjan") { }
|
||||
|
||||
bool OnUse(Player* pPlayer, Item* pItem, const SpellCastTargets & /*pTargets*/)
|
||||
bool OnUse(Player* player, Item* pItem, const SpellCastTargets & /*pTargets*/)
|
||||
{
|
||||
if (pPlayer->GetQuestStatus(QUEST_THE_EMISSARY) == QUEST_STATUS_INCOMPLETE)
|
||||
if (player->GetQuestStatus(QUEST_THE_EMISSARY) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
if (Creature* pLeviroth = pPlayer->FindNearestCreature(NPC_LEVIROTH, 10.0f)) // spell range
|
||||
if (Creature* pLeviroth = player->FindNearestCreature(NPC_LEVIROTH, 10.0f)) // spell range
|
||||
{
|
||||
pLeviroth->AI()->AttackStart(pPlayer);
|
||||
pLeviroth->AI()->AttackStart(player);
|
||||
return false;
|
||||
} else
|
||||
pPlayer->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, pItem, NULL);
|
||||
player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, pItem, NULL);
|
||||
} else
|
||||
pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW , pItem, NULL);
|
||||
player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW , pItem, NULL);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -434,17 +434,17 @@ class item_captured_frog : public ItemScript
|
||||
public:
|
||||
item_captured_frog() : ItemScript("item_captured_frog") { }
|
||||
|
||||
bool OnUse(Player* pPlayer, Item* pItem, SpellCastTargets const& /*targets*/)
|
||||
bool OnUse(Player* player, Item* pItem, SpellCastTargets const& /*targets*/)
|
||||
{
|
||||
if (pPlayer->GetQuestStatus(QUEST_THE_PERFECT_SPIES) == QUEST_STATUS_INCOMPLETE)
|
||||
if (player->GetQuestStatus(QUEST_THE_PERFECT_SPIES) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
if (pPlayer->FindNearestCreature(NPC_VANIRAS_SENTRY_TOTEM, 10.0f))
|
||||
if (player->FindNearestCreature(NPC_VANIRAS_SENTRY_TOTEM, 10.0f))
|
||||
return false;
|
||||
else
|
||||
pPlayer->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, pItem, NULL);
|
||||
player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, pItem, NULL);
|
||||
}
|
||||
else
|
||||
pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pItem, NULL);
|
||||
player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pItem, NULL);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -42,52 +42,52 @@ class npc_innkeeper : public CreatureScript
|
||||
public:
|
||||
npc_innkeeper() : CreatureScript("npc_innkeeper") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
if (IsEventActive(HALLOWEEN_EVENTID) && !pPlayer->HasAura(SPELL_TRICK_OR_TREATED))
|
||||
if (IsEventActive(HALLOWEEN_EVENTID) && !player->HasAura(SPELL_TRICK_OR_TREATED))
|
||||
{
|
||||
const char* localizedEntry;
|
||||
switch (pPlayer->GetSession()->GetSessionDbcLocale())
|
||||
switch (player->GetSession()->GetSessionDbcLocale())
|
||||
{
|
||||
case LOCALE_frFR: localizedEntry = LOCALE_TRICK_OR_TREAT_2; break;
|
||||
case LOCALE_deDE: localizedEntry = LOCALE_TRICK_OR_TREAT_3; break;
|
||||
case LOCALE_esES: localizedEntry = LOCALE_TRICK_OR_TREAT_6; break;
|
||||
case LOCALE_enUS: default: localizedEntry = LOCALE_TRICK_OR_TREAT_0;
|
||||
}
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, localizedEntry, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, localizedEntry, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID);
|
||||
}
|
||||
|
||||
if (creature->isQuestGiver())
|
||||
pPlayer->PrepareQuestMenu(creature->GetGUID());
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (creature->isVendor())
|
||||
pPlayer->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->isInnkeeper())
|
||||
{
|
||||
const char* localizedEntry;
|
||||
switch (pPlayer->GetSession()->GetSessionDbcLocale())
|
||||
switch (player->GetSession()->GetSessionDbcLocale())
|
||||
{
|
||||
case LOCALE_deDE: localizedEntry = LOCALE_INNKEEPER_3; break;
|
||||
case LOCALE_enUS: default: localizedEntry = LOCALE_INNKEEPER_0;
|
||||
}
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, localizedEntry, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INN);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, localizedEntry, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INN);
|
||||
}
|
||||
|
||||
pPlayer->TalkedToCreature(creature->GetEntry(), creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(creature), creature->GetGUID());
|
||||
player->TalkedToCreature(creature->GetEntry(), creature->GetGUID());
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
pPlayer->PlayerTalkClass->ClearMenus();
|
||||
if (uiAction == GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID && IsEventActive(HALLOWEEN_EVENTID) && !pPlayer->HasAura(SPELL_TRICK_OR_TREATED))
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
if (uiAction == GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID && IsEventActive(HALLOWEEN_EVENTID) && !player->HasAura(SPELL_TRICK_OR_TREATED))
|
||||
{
|
||||
pPlayer->CastSpell(pPlayer, SPELL_TRICK_OR_TREATED, true);
|
||||
player->CastSpell(player, SPELL_TRICK_OR_TREATED, true);
|
||||
|
||||
if (urand(0, 1))
|
||||
pPlayer->CastSpell(pPlayer, SPELL_TREAT, true);
|
||||
player->CastSpell(player, SPELL_TREAT, true);
|
||||
else
|
||||
{
|
||||
uint32 trickspell = 0;
|
||||
@@ -108,18 +108,18 @@ public:
|
||||
case 12: trickspell = 24926; break; // Hallow's End Candy
|
||||
case 13: trickspell = 24927; break; // Hallow's End Candy
|
||||
}
|
||||
pPlayer->CastSpell(pPlayer, trickspell, true);
|
||||
player->CastSpell(player, trickspell, true);
|
||||
}
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
return true;
|
||||
}
|
||||
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
|
||||
switch (uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_TRADE: pPlayer->GetSession()->SendListInventory(creature->GetGUID()); break;
|
||||
case GOSSIP_ACTION_INN: pPlayer->SetBindPoint(creature->GetGUID()); break;
|
||||
case GOSSIP_ACTION_TRADE: player->GetSession()->SendListInventory(creature->GetGUID()); break;
|
||||
case GOSSIP_ACTION_INN: player->SetBindPoint(creature->GetGUID()); break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -63,262 +63,262 @@ class npc_taxi : public CreatureScript
|
||||
public:
|
||||
npc_taxi() : CreatureScript("npc_taxi") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
if (creature->isQuestGiver())
|
||||
pPlayer->PrepareQuestMenu(creature->GetGUID());
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
switch(creature->GetEntry())
|
||||
{
|
||||
case 17435: // Azuremyst Isle - Susurrus
|
||||
if (pPlayer->HasItemCount(23843, 1, true))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SUSURRUS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
if (player->HasItemCount(23843, 1, true))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SUSURRUS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
break;
|
||||
case 20903: // Netherstorm - Protectorate Nether Drake
|
||||
if (pPlayer->GetQuestStatus(10438) == QUEST_STATUS_INCOMPLETE && pPlayer->HasItemCount(29778, 1))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_NETHER_DRAKE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
if (player->GetQuestStatus(10438) == QUEST_STATUS_INCOMPLETE && player->HasItemCount(29778, 1))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_NETHER_DRAKE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
break;
|
||||
case 18725: // Old Hillsbrad Foothills - Brazen
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BRAZEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BRAZEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
break;
|
||||
case 29154: // Stormwind City - Thargold Ironwing
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_IRONWING, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_IRONWING, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
break;
|
||||
case 19409: // Hellfire Peninsula - Wing Commander Dabir'ee
|
||||
//Mission: The Murketh and Shaadraz Gateways
|
||||
if (pPlayer->GetQuestStatus(10146) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DABIREE1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
|
||||
if (player->GetQuestStatus(10146) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DABIREE1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
|
||||
|
||||
//Shatter Point
|
||||
if (!pPlayer->GetQuestRewardStatus(10340))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DABIREE2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
|
||||
if (!player->GetQuestRewardStatus(10340))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DABIREE2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
|
||||
break;
|
||||
case 20235: // Hellfire Peninsula - Gryphoneer Windbellow
|
||||
//Mission: The Abyssal Shelf || Return to the Abyssal Shelf
|
||||
if (pPlayer->GetQuestStatus(10163) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(10346) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WINDBELLOW1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
|
||||
if (player->GetQuestStatus(10163) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(10346) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WINDBELLOW1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
|
||||
|
||||
//Go to the Front
|
||||
if (pPlayer->GetQuestStatus(10382) != QUEST_STATUS_NONE && !pPlayer->GetQuestRewardStatus(10382))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WINDBELLOW2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
|
||||
if (player->GetQuestStatus(10382) != QUEST_STATUS_NONE && !player->GetQuestRewardStatus(10382))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WINDBELLOW2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
|
||||
break;
|
||||
case 19401: // Hellfire Peninsula - Wing Commander Brack
|
||||
//Mission: The Murketh and Shaadraz Gateways
|
||||
if (pPlayer->GetQuestStatus(10129) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BRACK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
|
||||
if (player->GetQuestStatus(10129) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BRACK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
|
||||
|
||||
//Mission: The Abyssal Shelf || Return to the Abyssal Shelf
|
||||
if (pPlayer->GetQuestStatus(10162) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(10347) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BRACK2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
|
||||
if (player->GetQuestStatus(10162) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(10347) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BRACK2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
|
||||
|
||||
//Spinebreaker Post
|
||||
if (pPlayer->GetQuestStatus(10242) == QUEST_STATUS_COMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BRACK3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
|
||||
if (player->GetQuestStatus(10242) == QUEST_STATUS_COMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BRACK3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
|
||||
break;
|
||||
case 23413: // Blade's Edge Mountains - Skyguard Handler Irena
|
||||
if (pPlayer->GetReputationRank(1031) >= REP_HONORED)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_IRENA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
|
||||
if (player->GetReputationRank(1031) >= REP_HONORED)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_IRENA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
|
||||
break;
|
||||
case 25059: // Isle of Quel'Danas - Ayren Cloudbreaker
|
||||
if (pPlayer->GetQuestStatus(11532) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(11533) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CLOUDBREAKER1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
|
||||
if (player->GetQuestStatus(11532) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(11533) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CLOUDBREAKER1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
|
||||
|
||||
if (pPlayer->GetQuestStatus(11542) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(11543) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CLOUDBREAKER2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13);
|
||||
if (player->GetQuestStatus(11542) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(11543) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CLOUDBREAKER2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13);
|
||||
break;
|
||||
case 25236: // Isle of Quel'Danas - Unrestrained Dragonhawk
|
||||
if (pPlayer->GetQuestStatus(11542) == QUEST_STATUS_COMPLETE || pPlayer->GetQuestStatus(11543) == QUEST_STATUS_COMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DRAGONHAWK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14);
|
||||
if (player->GetQuestStatus(11542) == QUEST_STATUS_COMPLETE || player->GetQuestStatus(11543) == QUEST_STATUS_COMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DRAGONHAWK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14);
|
||||
break;
|
||||
case 20162: // Netherstorm - Veronia
|
||||
//Behind Enemy Lines
|
||||
if (pPlayer->GetQuestStatus(10652) != QUEST_STATUS_REWARDED)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_VERONIA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 15);
|
||||
if (player->GetQuestStatus(10652) != QUEST_STATUS_REWARDED)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_VERONIA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 15);
|
||||
break;
|
||||
case 23415: // Terokkar Forest - Skyguard Handler Deesak
|
||||
if (pPlayer->GetReputationRank(1031) >= REP_HONORED)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DEESAK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 16);
|
||||
if (player->GetReputationRank(1031) >= REP_HONORED)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DEESAK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 16);
|
||||
break;
|
||||
case 27575: // Dragonblight - Lord Afrasastrasz
|
||||
// middle -> ground
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_AFRASASTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 17);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_AFRASASTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 17);
|
||||
// middle -> top
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_AFRASASTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 18);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_AFRASASTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 18);
|
||||
break;
|
||||
case 26443: // Dragonblight - Tariolstrasz //need to check if quests are required before gossip available (12123, 12124)
|
||||
// ground -> top
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TARIOLSTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 19);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TARIOLSTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 19);
|
||||
// ground -> middle
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TARIOLSTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 20);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TARIOLSTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 20);
|
||||
break;
|
||||
case 26949: // Dragonblight - Torastrasza
|
||||
// top -> middle
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TORASTRASZA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TORASTRASZA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
|
||||
// top -> ground
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TORASTRASZA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TORASTRASZA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
|
||||
break;
|
||||
case 23816: // Howling Fjord - Bat Handler Camille
|
||||
if (!pPlayer->GetQuestRewardStatus(11229))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CAMILLE1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 23);
|
||||
if (pPlayer->GetQuestStatus(11170) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CAMILLE2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 24);
|
||||
if (!player->GetQuestRewardStatus(11229))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CAMILLE1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 23);
|
||||
if (player->GetQuestStatus(11170) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CAMILLE2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 24);
|
||||
break;
|
||||
case 23704: // Dustwallow Marsh - Cassa Crimsonwing
|
||||
if (pPlayer->GetQuestStatus(11142) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CRIMSONWING, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+25);
|
||||
if (player->GetQuestStatus(11142) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CRIMSONWING, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+25);
|
||||
break;
|
||||
case 26602:
|
||||
if (creature->isTaxi())
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, GOSSIP_THRICESTAR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 26);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, GOSSIP_THRICESTAR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 26);
|
||||
|
||||
if (pPlayer->GetQuestStatus(11692) == QUEST_STATUS_COMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_THRICESTAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 27);
|
||||
if (player->GetQuestStatus(11692) == QUEST_STATUS_COMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_THRICESTAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 27);
|
||||
break;
|
||||
case 17209:
|
||||
pPlayer->SetTaxiCheater(true);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WILLIAMKEILAR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 28);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WILLIAMKEILAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 29);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WILLIAMKEILAR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 30);
|
||||
player->SetTaxiCheater(true);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WILLIAMKEILAR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 28);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WILLIAMKEILAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 29);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WILLIAMKEILAR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 30);
|
||||
break;
|
||||
}
|
||||
|
||||
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(creature), creature->GetGUID());
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
pPlayer->PlayerTalkClass->ClearMenus();
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch(uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF:
|
||||
//spellId is correct, however it gives flight a somewhat funny effect //TaxiPath 506.
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, 32474, true);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, 32474, true);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(627); //TaxiPath 627 (possibly 627+628(152->153->154->155))
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(627); //TaxiPath 627 (possibly 627+628(152->153->154->155))
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
if (!pPlayer->HasItemCount(25853, 1)) {
|
||||
pPlayer->SEND_GOSSIP_MENU(9780, creature->GetGUID());
|
||||
if (!player->HasItemCount(25853, 1)) {
|
||||
player->SEND_GOSSIP_MENU(9780, creature->GetGUID());
|
||||
} else {
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(534); //TaxiPath 534
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(534); //TaxiPath 534
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, 53335, true); //TaxiPath 1041 (Stormwind Harbor)
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, 53335, true); //TaxiPath 1041 (Stormwind Harbor)
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 4:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, 33768, true); //TaxiPath 585 (Gateways Murket and Shaadraz)
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, 33768, true); //TaxiPath 585 (Gateways Murket and Shaadraz)
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 5:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, 35069, true); //TaxiPath 612 (Taxi - Hellfire Peninsula - Expedition Point to Shatter Point)
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, 35069, true); //TaxiPath 612 (Taxi - Hellfire Peninsula - Expedition Point to Shatter Point)
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 6:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, 33899, true); //TaxiPath 589 (Aerial Assault Flight (Alliance))
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, 33899, true); //TaxiPath 589 (Aerial Assault Flight (Alliance))
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 7:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, 35065, true); //TaxiPath 607 (Taxi - Hellfire Peninsula - Shatter Point to Beach Head)
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, 35065, true); //TaxiPath 607 (Taxi - Hellfire Peninsula - Shatter Point to Beach Head)
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 8:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, 33659, true); //TaxiPath 584 (Gateways Murket and Shaadraz)
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, 33659, true); //TaxiPath 584 (Gateways Murket and Shaadraz)
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 9:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, 33825, true); //TaxiPath 587 (Aerial Assault Flight (Horde))
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, 33825, true); //TaxiPath 587 (Aerial Assault Flight (Horde))
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 10:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, 34578, true); //TaxiPath 604 (Taxi - Reaver's Fall to Spinebreaker Ridge)
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, 34578, true); //TaxiPath 604 (Taxi - Reaver's Fall to Spinebreaker Ridge)
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 11:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, 41278, true); //TaxiPath 706
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, 41278, true); //TaxiPath 706
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 12:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, 45071, true); //TaxiPath 779
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, 45071, true); //TaxiPath 779
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 13:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, 45113, true); //TaxiPath 784
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, 45113, true); //TaxiPath 784
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 14:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, 45353, true); //TaxiPath 788
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, 45353, true); //TaxiPath 788
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 15:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, 34905, true); //TaxiPath 606
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, 34905, true); //TaxiPath 606
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 16:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, 41279, true); //TaxiPath 705 (Taxi - Skettis to Skyguard Outpost)
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, 41279, true); //TaxiPath 705 (Taxi - Skettis to Skyguard Outpost)
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 17:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(882);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(882);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 18:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(881);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(881);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 19:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(878);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(878);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 20:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(883);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(883);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 21:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(880);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(880);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 22:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(879);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(879);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 23:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, 43074, true); //TaxiPath 736
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, 43074, true); //TaxiPath 736
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 24:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
//pPlayer->ActivateTaxiPathTo(738);
|
||||
pPlayer->CastSpell(pPlayer, 43136, false);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
//player->ActivateTaxiPathTo(738);
|
||||
player->CastSpell(player, 43136, false);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 25:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, 42295, true);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, 42295, true);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 26:
|
||||
pPlayer->GetSession()->SendTaxiMenu(creature);
|
||||
player->GetSession()->SendTaxiMenu(creature);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 27:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, 51446, false);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, 51446, false);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 28:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(494);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(494);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 29:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(495);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(495);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 30:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(496);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(496);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user