mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-02 10:33:46 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -1921,7 +1921,7 @@ void GameObject::Use(Unit* user)
|
||||
if (info->entry == 194097)
|
||||
spellId = 61994; // Ritual of Summoning
|
||||
else
|
||||
spellId = 59782; // Summoning Stone Effect
|
||||
spellId = 23598; // Meeting Stone Summon
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2503,7 +2503,7 @@ float Pet::GetNativeObjectScale() const
|
||||
if (creatureFamily && creatureFamily->minScale > 0.0f && getPetType() & HUNTER_PET)
|
||||
{
|
||||
float minScaleLevel = creatureFamily->minScaleLevel;
|
||||
uint8 level = getLevel();
|
||||
uint8 level = GetLevel();
|
||||
|
||||
float minLevelScaleMod = level >= minScaleLevel ? (level / minScaleLevel) : 0.0f;
|
||||
float maxScaleMod = creatureFamily->maxScaleLevel - minScaleLevel;
|
||||
@@ -2513,15 +2513,32 @@ float Pet::GetNativeObjectScale() const
|
||||
|
||||
float scaleMod = creatureFamily->maxScaleLevel != minScaleLevel ? minLevelScaleMod / maxScaleMod : 0.f;
|
||||
|
||||
float scale = (creatureFamily->maxScale - creatureFamily->minScale) * scaleMod + creatureFamily->minScale;
|
||||
float maxScale = creatureFamily->maxScale;
|
||||
|
||||
scale = std::min(scale, creatureFamily->maxScale);
|
||||
|
||||
if (CreatureDisplayInfoEntry const* displayInfo = sCreatureDisplayInfoStore.LookupEntry(GetNativeDisplayId()))
|
||||
// override maxScale
|
||||
switch (ctFamily)
|
||||
{
|
||||
if (scale < 1.f && displayInfo->scale > 1.f)
|
||||
scale *= displayInfo->scale;
|
||||
case CREATURE_FAMILY_CHIMAERA:
|
||||
case CREATURE_FAMILY_CORE_HOUND:
|
||||
case CREATURE_FAMILY_CRAB:
|
||||
case CREATURE_FAMILY_DEVILSAUR:
|
||||
case CREATURE_FAMILY_NETHER_RAY:
|
||||
case CREATURE_FAMILY_RHINO:
|
||||
case CREATURE_FAMILY_SPIDER:
|
||||
case CREATURE_FAMILY_TURTLE:
|
||||
case CREATURE_FAMILY_WARP_STALKER:
|
||||
case CREATURE_FAMILY_WASP:
|
||||
case CREATURE_FAMILY_WIND_SERPENT:
|
||||
maxScale = 1.0f;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
float scale = (maxScale - creatureFamily->minScale) * scaleMod + creatureFamily->minScale;
|
||||
|
||||
scale = std::min(scale, maxScale);
|
||||
|
||||
return scale;
|
||||
}
|
||||
|
||||
|
||||
@@ -173,12 +173,13 @@ void Totem::UnSummon(uint32 msTime)
|
||||
|
||||
bool Totem::IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const
|
||||
{
|
||||
// xinef: immune to all positive spells, except of stoneclaw totem absorb and sentry totem bind sight
|
||||
// xinef: immune to all positive spells, except of stoneclaw totem absorb, sentry totem bind sight and intervene
|
||||
// totems positive spells have unit_caster target
|
||||
if (spellInfo->Effects[index].Effect != SPELL_EFFECT_DUMMY &&
|
||||
spellInfo->Effects[index].Effect != SPELL_EFFECT_SCRIPT_EFFECT &&
|
||||
spellInfo->IsPositive() && spellInfo->Effects[index].TargetA.GetTarget() != TARGET_UNIT_CASTER &&
|
||||
spellInfo->Effects[index].TargetA.GetCheckType() != TARGET_CHECK_ENTRY && spellInfo->Id != 55277 && spellInfo->Id != 6277)
|
||||
spellInfo->Effects[index].TargetA.GetCheckType() != TARGET_CHECK_ENTRY &&
|
||||
spellInfo->Id != SPELL_STONECLAW && spellInfo->Id != SPELL_BIND_SIGHT && spellInfo->Id != SPELL_INTERVENE)
|
||||
return true;
|
||||
|
||||
// Cyclone shouldn't be casted on totems
|
||||
|
||||
@@ -37,7 +37,15 @@ enum class TotemSpellIds : uint32
|
||||
#define SENTRY_TOTEM_ENTRY 3968
|
||||
#define EARTHBIND_TOTEM_ENTRY 2630
|
||||
|
||||
constexpr uint32 SPELL_CYCLONE = 33786;
|
||||
enum TotemImmunitySpells
|
||||
{
|
||||
// Immune
|
||||
SPELL_CYCLONE = 33786,
|
||||
// Not Immune
|
||||
SPELL_STONECLAW = 55277,
|
||||
SPELL_BIND_SIGHT = 6277,
|
||||
SPELL_INTERVENE = 3411
|
||||
};
|
||||
|
||||
class Totem : public Minion
|
||||
{
|
||||
|
||||
@@ -20597,7 +20597,7 @@ void Unit::CastDelayedSpellWithPeriodicAmount(Unit* caster, uint32 spellId, Aura
|
||||
}
|
||||
|
||||
// xinef: delay only for casting on different unit
|
||||
if (this == caster)
|
||||
if (this == caster || !sWorld->getBoolConfig(CONFIG_MUNCHING_BLIZZLIKE))
|
||||
caster->CastCustomSpell(spellId, SPELLVALUE_BASE_POINT0, addAmount, this, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_NO_PERIODIC_RESET), nullptr, nullptr, caster->GetGUID());
|
||||
else
|
||||
caster->m_Events.AddEvent(new AuraMunchingQueue(*caster, GetGUID(), addAmount, spellId), caster->m_Events.CalculateQueueTime(400));
|
||||
|
||||
Reference in New Issue
Block a user