mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 10:00:28 +00:00
feat(Core/Hooks): added collection of hooks to extends AC (#3047)
This collection of hooks comes from the Maelstrom project. It allows to release modules such as : - 3v3-soloqueue - 1v1 arena - pvestats and many others
This commit is contained in:
@@ -347,12 +347,14 @@ public:
|
||||
{
|
||||
player->SetDeveloper(true);
|
||||
handler->GetSession()->SendNotification(LANG_DEV_ON);
|
||||
sScriptMgr->OnHandleDevCommand(handler->GetSession()->GetPlayer(), enablestr);
|
||||
return true;
|
||||
}
|
||||
else if (enablestr == "off")
|
||||
{
|
||||
player->SetDeveloper(false);
|
||||
handler->GetSession()->SendNotification(LANG_DEV_OFF);
|
||||
sScriptMgr->OnHandleDevCommand(handler->GetSession()->GetPlayer(), enablestr);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -265,8 +265,8 @@ public:
|
||||
|
||||
void SetDest(SpellDestination& dest)
|
||||
{
|
||||
std::list<Spell::TargetInfo> const* targetsInfo = GetSpell()->GetUniqueTargetInfo();
|
||||
for (std::list<Spell::TargetInfo>::const_iterator ihit = targetsInfo->begin(); ihit != targetsInfo->end(); ++ihit)
|
||||
std::list<TargetInfo> const* targetsInfo = GetSpell()->GetUniqueTargetInfo();
|
||||
for (std::list<TargetInfo>::const_iterator ihit = targetsInfo->begin(); ihit != targetsInfo->end(); ++ihit)
|
||||
if (Unit* target = ObjectAccessor::GetUnit(*GetCaster(), ihit->targetGUID))
|
||||
{
|
||||
dest.Relocate(*target);
|
||||
|
||||
@@ -613,8 +613,8 @@ public:
|
||||
}
|
||||
|
||||
float pct = (_sharedHealth / _sharedHealthMax) * 100.0f;
|
||||
std::list<Spell::TargetInfo> const* targetsInfo = GetSpell()->GetUniqueTargetInfo();
|
||||
for (std::list<Spell::TargetInfo>::const_iterator ihit = targetsInfo->begin(); ihit != targetsInfo->end(); ++ihit)
|
||||
std::list<TargetInfo> const* targetsInfo = GetSpell()->GetUniqueTargetInfo();
|
||||
for (std::list<TargetInfo>::const_iterator ihit = targetsInfo->begin(); ihit != targetsInfo->end(); ++ihit)
|
||||
if (Creature* target = ObjectAccessor::GetCreature(*GetCaster(), ihit->targetGUID))
|
||||
{
|
||||
target->LowerPlayerDamageReq(target->GetMaxHealth());
|
||||
|
||||
@@ -606,8 +606,8 @@ public:
|
||||
{
|
||||
if (GetHitUnit() != GetCaster())
|
||||
{
|
||||
std::list<Spell::TargetInfo>* targetsInfo = GetSpell()->GetUniqueTargetInfo();
|
||||
for (std::list<Spell::TargetInfo>::iterator ihit = targetsInfo->begin(); ihit != targetsInfo->end(); ++ihit)
|
||||
std::list<TargetInfo>* targetsInfo = GetSpell()->GetUniqueTargetInfo();
|
||||
for (std::list<TargetInfo>::iterator ihit = targetsInfo->begin(); ihit != targetsInfo->end(); ++ihit)
|
||||
if (ihit->targetGUID == GetCaster()->GetGUID())
|
||||
ihit->damage = -int32(GetHitDamage() * 0.25f);
|
||||
}
|
||||
|
||||
@@ -430,8 +430,8 @@ public:
|
||||
{
|
||||
if (Unit* target = GetExplTargetUnit())
|
||||
{
|
||||
std::list<Spell::TargetInfo> const* targetsInfo = GetSpell()->GetUniqueTargetInfo();
|
||||
for (std::list<Spell::TargetInfo>::const_iterator ihit = targetsInfo->begin(); ihit != targetsInfo->end(); ++ihit)
|
||||
std::list<TargetInfo> const* targetsInfo = GetSpell()->GetUniqueTargetInfo();
|
||||
for (std::list<TargetInfo>::const_iterator ihit = targetsInfo->begin(); ihit != targetsInfo->end(); ++ihit)
|
||||
if (ihit->missCondition == SPELL_MISS_NONE && ihit->targetGUID == target->GetGUID())
|
||||
GetCaster()->CastSpell(target, 55095 /*SPELL_FROST_FEVER*/, true);
|
||||
}
|
||||
@@ -610,8 +610,8 @@ public:
|
||||
|
||||
void RecalculateDamage()
|
||||
{
|
||||
std::list<Spell::TargetInfo>* targetsInfo = GetSpell()->GetUniqueTargetInfo();
|
||||
for (std::list<Spell::TargetInfo>::iterator ihit = targetsInfo->begin(); ihit != targetsInfo->end(); ++ihit)
|
||||
std::list<TargetInfo>* targetsInfo = GetSpell()->GetUniqueTargetInfo();
|
||||
for (std::list<TargetInfo>::iterator ihit = targetsInfo->begin(); ihit != targetsInfo->end(); ++ihit)
|
||||
if (ihit->targetGUID == GetCaster()->GetGUID())
|
||||
ihit->crit = roll_chance_f(GetCaster()->GetFloatValue(PLAYER_CRIT_PERCENTAGE));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user