aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Commands/cs_gm.cpp34
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp9
-rw-r--r--src/server/scripts/Kalimdor/zone_ashenvale.cpp2
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp42
4 files changed, 69 insertions, 18 deletions
diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp
index 2b8bf7f7233..5b58ccf6474 100644
--- a/src/server/scripts/Commands/cs_gm.cpp
+++ b/src/server/scripts/Commands/cs_gm.cpp
@@ -195,33 +195,34 @@ public:
//Enable\Disable Invisible mode
static bool HandleGMVisibleCommand(ChatHandler* handler, char const* args)
{
+ Player* _player = handler->GetSession()->GetPlayer();
+
if (!*args)
{
- handler->PSendSysMessage(LANG_YOU_ARE, handler->GetSession()->GetPlayer()->isGMVisible() ? handler->GetTrinityString(LANG_VISIBLE) : handler->GetTrinityString(LANG_INVISIBLE));
+ handler->PSendSysMessage(LANG_YOU_ARE, _player->isGMVisible() ? handler->GetTrinityString(LANG_VISIBLE) : handler->GetTrinityString(LANG_INVISIBLE));
return true;
}
const uint32 VISUAL_AURA = 37800;
std::string param = (char*)args;
- Player* player = handler->GetSession()->GetPlayer();
if (param == "on")
{
- if (player->HasAura(VISUAL_AURA, 0))
- player->RemoveAurasDueToSpell(VISUAL_AURA);
+ if (_player->HasAura(VISUAL_AURA, 0))
+ _player->RemoveAurasDueToSpell(VISUAL_AURA);
- player->SetGMVisible(true);
+ _player->SetGMVisible(true);
+ _player->UpdateObjectVisibility();
handler->GetSession()->SendNotification(LANG_INVISIBLE_VISIBLE);
return true;
}
if (param == "off")
{
+ _player->AddAura(VISUAL_AURA, _player);
+ _player->SetGMVisible(false);
+ _player->UpdateObjectVisibility();
handler->GetSession()->SendNotification(LANG_INVISIBLE_INVISIBLE);
- player->SetGMVisible(false);
-
- player->AddAura(VISUAL_AURA, player);
-
return true;
}
@@ -233,12 +234,11 @@ public:
//Enable\Disable GM Mode
static bool HandleGMCommand(ChatHandler* handler, char const* args)
{
+ Player* _player = handler->GetSession()->GetPlayer();
+
if (!*args)
{
- if (handler->GetSession()->GetPlayer()->IsGameMaster())
- handler->GetSession()->SendNotification(LANG_GM_ON);
- else
- handler->GetSession()->SendNotification(LANG_GM_OFF);
+ handler->GetSession()->SendNotification(_player->IsGameMaster() ? LANG_GM_ON : LANG_GM_OFF);
return true;
}
@@ -246,9 +246,9 @@ public:
if (param == "on")
{
- handler->GetSession()->GetPlayer()->SetGameMaster(true);
+ _player->SetGameMaster(true);
handler->GetSession()->SendNotification(LANG_GM_ON);
- handler->GetSession()->GetPlayer()->UpdateTriggerVisibility();
+ _player->UpdateTriggerVisibility();
#ifdef _DEBUG_VMAPS
VMAP::IVMapManager* vMapManager = VMAP::VMapFactory::createOrGetVMapManager();
vMapManager->processCommand("stoplog");
@@ -258,9 +258,9 @@ public:
if (param == "off")
{
- handler->GetSession()->GetPlayer()->SetGameMaster(false);
+ _player->SetGameMaster(false);
handler->GetSession()->SendNotification(LANG_GM_OFF);
- handler->GetSession()->GetPlayer()->UpdateTriggerVisibility();
+ _player->UpdateTriggerVisibility();
#ifdef _DEBUG_VMAPS
VMAP::IVMapManager* vMapManager = VMAP::VMapFactory::createOrGetVMapManager();
vMapManager->processCommand("startlog");
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index 1b6a5fd9b22..67dbaacedce 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -93,6 +93,7 @@ public:
{ "unpossess", rbac::RBAC_PERM_COMMAND_UNPOSSESS, false, &HandleUnPossessCommand, "", NULL },
{ "unstuck", rbac::RBAC_PERM_COMMAND_UNSTUCK, true, &HandleUnstuckCommand, "", NULL },
{ "wchange", rbac::RBAC_PERM_COMMAND_WCHANGE, false, &HandleChangeWeather, "", NULL },
+ { "mailbox", rbac::RBAC_PERM_COMMAND_MAILBOX, false, &HandleMailBoxCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
return commandTable;
@@ -2470,6 +2471,14 @@ public:
player->StopCastingBindSight();
return true;
}
+
+ static bool HandleMailBoxCommand(ChatHandler* handler, char const* /*args*/)
+ {
+ Player* player = handler->GetSession()->GetPlayer();
+
+ handler->GetSession()->SendShowMailBox(player->GetGUID());
+ return true;
+ }
};
void AddSC_misc_commandscript()
diff --git a/src/server/scripts/Kalimdor/zone_ashenvale.cpp b/src/server/scripts/Kalimdor/zone_ashenvale.cpp
index 41c0441bca5..ec28ee42625 100644
--- a/src/server/scripts/Kalimdor/zone_ashenvale.cpp
+++ b/src/server/scripts/Kalimdor/zone_ashenvale.cpp
@@ -198,7 +198,7 @@ public:
void sQuestAccept(Player* player, Quest const* quest)
{
- if (quest->GetQuestId() == QUEST_TOREK_ASSULT)
+ if (quest->GetQuestId() == QUEST_FREEDOM_TO_RUUL)
{
me->setFaction(FACTION_QUEST);
npc_escortAI::Start(true, false, player->GetGUID());
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 419a289aed4..4dd06b762a1 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -2241,6 +2241,47 @@ class spell_q12919_gymers_throw : public SpellScriptLoader
}
};
+enum Quest_The_Hunter_And_The_Prince
+{
+ SPELL_ILLIDAN_KILL_CREDIT = 61748
+};
+
+class spell_q13400_illidan_kill_master : public SpellScriptLoader
+{
+ public:
+ spell_q13400_illidan_kill_master() : SpellScriptLoader("spell_q13400_illidan_kill_master") { }
+
+ class spell_q13400_illidan_kill_master_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_q13400_illidan_kill_master_SpellScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_ILLIDAN_KILL_CREDIT))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (caster->IsVehicle())
+ if (Unit* passenger = caster->GetVehicleKit()->GetPassenger(0))
+ passenger->CastSpell(passenger, SPELL_ILLIDAN_KILL_CREDIT, true);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_q13400_illidan_kill_master_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_q13400_illidan_kill_master_SpellScript();
+ }
+};
+
void AddSC_quest_spell_scripts()
{
new spell_q55_sacred_cleansing();
@@ -2295,4 +2336,5 @@ void AddSC_quest_spell_scripts()
new spell_q12619_emblazon_runeblade_effect();
new spell_q12919_gymers_grab();
new spell_q12919_gymers_throw();
+ new spell_q13400_illidan_kill_master();
}