mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 06:06:23 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -15,13 +15,6 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
Name: gobject_commandscript
|
||||
%Complete: 100
|
||||
Comment: All gobject related commands
|
||||
Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "Chat.h"
|
||||
#include "CommandScript.h"
|
||||
#include "GameEventMgr.h"
|
||||
@@ -59,7 +52,8 @@ public:
|
||||
{ "add temp", HandleGameObjectAddTempCommand, SEC_GAMEMASTER, Console::No },
|
||||
{ "add", HandleGameObjectAddCommand, SEC_ADMINISTRATOR, Console::No },
|
||||
{ "set phase", HandleGameObjectSetPhaseCommand, SEC_ADMINISTRATOR, Console::No },
|
||||
{ "set state", HandleGameObjectSetStateCommand, SEC_ADMINISTRATOR, Console::No }
|
||||
{ "set state", HandleGameObjectSetStateCommand, SEC_ADMINISTRATOR, Console::No },
|
||||
{ "respawn", HandleGameObjectRespawn, SEC_GAMEMASTER, Console::No }
|
||||
};
|
||||
static ChatCommandTable commandTable =
|
||||
{
|
||||
@@ -581,6 +575,20 @@ public:
|
||||
handler->PSendSysMessage("Set gobject type %d state %u", objectType, *objectState);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGameObjectRespawn(ChatHandler* handler, GameObjectSpawnId guidLow)
|
||||
{
|
||||
GameObject* object = handler->GetObjectFromPlayerMapByDbGuid(guidLow);
|
||||
if (!object)
|
||||
{
|
||||
handler->SendErrorMessage(LANG_COMMAND_OBJNOTFOUND, uint32(guidLow));
|
||||
return false;
|
||||
}
|
||||
|
||||
object->Respawn();
|
||||
handler->PSendSysMessage(LANG_CMD_GO_RESPAWN, object->GetNameForLocaleIdx(handler->GetSessionDbcLocale()), object->GetEntry(), object->GetSpawnId());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_gobject_commandscript()
|
||||
|
||||
@@ -82,6 +82,8 @@ struct boss_the_lurker_below : public BossAI
|
||||
if (GameObject* pool = instance->GetGameObject(DATA_STRANGE_POOL))
|
||||
{
|
||||
pool->Respawn();
|
||||
pool->SetRespawnTime(10);
|
||||
pool->SaveRespawnTime(10);
|
||||
}
|
||||
me->DespawnOrUnsummon(2000);
|
||||
}
|
||||
|
||||
@@ -693,6 +693,65 @@ class spell_rog_pickpocket : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
enum vanish
|
||||
{
|
||||
SPELL_PARALYZE = 38132,
|
||||
SPELL_CLEAN_ESCAPE_AURA = 23582,
|
||||
SPELL_CLEAN_ESCAPE_HEAL = 23583
|
||||
};
|
||||
|
||||
// 18461 - Vanish Purge (Server Side)
|
||||
class spell_rog_vanish_purge : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_rog_vanish_purge);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_PARALYZE });
|
||||
}
|
||||
|
||||
void HandleRootRemove(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (GetCaster() && !GetCaster()->HasAura(SPELL_PARALYZE)) // Root from Tainted Core SSC, should not be removed by vanish.
|
||||
GetCaster()->RemoveAurasWithMechanic(1 << MECHANIC_ROOT);
|
||||
}
|
||||
|
||||
void HandleSnareRemove(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (GetCaster())
|
||||
GetCaster()->RemoveAurasWithMechanic(1 << MECHANIC_SNARE);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
// Blizzard handles EFFECT_0 as the unroot and EFFECT_1 as unsnare. Hence why they are not done in the same place.
|
||||
OnEffectHitTarget += SpellEffectFn(spell_rog_vanish_purge::HandleRootRemove, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_rog_vanish_purge::HandleSnareRemove, EFFECT_1, SPELL_EFFECT_APPLY_AURA);
|
||||
}
|
||||
};
|
||||
|
||||
// -1856 - Vanish
|
||||
class spell_rog_vanish : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_rog_vanish);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_CLEAN_ESCAPE_AURA, SPELL_CLEAN_ESCAPE_HEAL });
|
||||
}
|
||||
|
||||
void HandleEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (GetCaster() && GetCaster()->HasAura(SPELL_CLEAN_ESCAPE_AURA))
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_CLEAN_ESCAPE_HEAL, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_rog_vanish::HandleEffect, EFFECT_2, SPELL_EFFECT_SANCTUARY);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_rogue_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_rog_savage_combat);
|
||||
@@ -709,5 +768,7 @@ void AddSC_rogue_spell_scripts()
|
||||
RegisterSpellScript(spell_rog_tricks_of_the_trade);
|
||||
RegisterSpellScript(spell_rog_tricks_of_the_trade_proc);
|
||||
RegisterSpellScript(spell_rog_pickpocket);
|
||||
RegisterSpellScript(spell_rog_vanish_purge);
|
||||
RegisterSpellScript(spell_rog_vanish);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user