*Update Mana Shield Spell Power Coefficient - by fukifat.
*Add function void AuraEffect::HandleAuraEffectSpecificMods(bool apply, bool Real, bool changeAmount), and aura effect specific stuff to it. *More correct aura scaling with lvl for area auras. *Prevent exploits with relog while having auras with modified amount. --HG-- branch : trunk
This commit is contained in:
1 parent
348116f6f8
commit
ba91c78ceb
10 files changed
+346
-650
No files matched your search
@@ -142,6 +142,7 @@ class Pet : public Guardian
|
||||
bool Create (uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry, uint32 pet_number);
|
||||
bool CreateBaseAtCreature(Creature* creature);
|
||||
bool LoadPetFromDB( Player* owner,uint32 petentry = 0,uint32 petnumber = 0, bool current = false );
|
||||
bool isBeingLoaded() const { return m_loading;}
|
||||
void SavePetToDB(PetSaveMode mode);
|
||||
void Remove(PetSaveMode mode, bool returnreagent = false);
|
||||
static void DeleteFromDB(uint32 guidlow);
|
||||
|
||||
@@ -1276,6 +1276,7 @@ class TRINITY_DLL_SPEC Player : public Unit
|
||||
/*********************************************************/
|
||||
|
||||
bool LoadFromDB(uint32 guid, SqlQueryHolder *holder);
|
||||
bool isBeingLoaded() const { return GetSession()->PlayerLoading();}
|
||||
|
||||
bool MinimalLoadFromDB(QueryResult *result, uint32 guid);
|
||||
static bool LoadValuesArrayFromDB(Tokens& data,uint64 guid);
|
||||
|
||||
+324
-641
File diff suppressed because it is too large.
Load diff
@@ -222,7 +222,6 @@ class TRINITY_DLL_SPEC AuraEffect
|
||||
void HandlePeriodicTriggerSpellWithValue(bool apply, bool Real, bool changeAmount);
|
||||
void HandlePeriodicEnergize(bool Apply, bool Real, bool changeAmount);
|
||||
void HandleAuraModResistanceExclusive(bool Apply, bool Real, bool changeAmount);
|
||||
void HandleAuraSafeFall(bool Apply, bool Real, bool changeAmount);
|
||||
void HandleAuraModPetTalentsPoints(bool Apply, bool Real, bool changeAmount);
|
||||
void HandleModStealth(bool Apply, bool Real, bool changeAmount);
|
||||
void HandleInvisibility(bool Apply, bool Real, bool changeAmount);
|
||||
@@ -321,9 +320,7 @@ class TRINITY_DLL_SPEC AuraEffect
|
||||
void HandleForceMoveForward(bool apply, bool Real, bool changeAmount);
|
||||
void HandleAuraModResistenceOfStatPercent(bool apply, bool Real, bool changeAmount);
|
||||
void HandleAuraPowerBurn(bool apply, bool Real, bool changeAmount);
|
||||
void HandleSchoolAbsorb(bool apply, bool Real, bool changeAmount);
|
||||
void HandlePreventFleeing(bool apply, bool Real, bool changeAmount);
|
||||
void HandleManaShield(bool apply, bool Real, bool changeAmount);
|
||||
void HandleArenaPreparation(bool apply, bool Real, bool changeAmount);
|
||||
void HandleAuraConvertRune(bool apply, bool Real, bool changeAmount);
|
||||
void HandleAuraIncreaseBaseHealthPercent(bool Apply, bool Real, bool changeAmount);
|
||||
@@ -331,10 +328,10 @@ class TRINITY_DLL_SPEC AuraEffect
|
||||
void HandlePhase(bool Apply, bool Real, bool changeAmount);
|
||||
void HandleAuraAllowOnlyAbility(bool apply, bool Real, bool changeAmount);
|
||||
void HandleCharmConvert(bool apply, bool Real, bool changeAmount);
|
||||
void HandleReflectSpells( bool Apply, bool Real , bool changeAmount);
|
||||
void HandleAuraInitializeImages(bool Apply, bool Real, bool changeAmount);
|
||||
void HandleAuraCloneCaster(bool Apply, bool Real, bool changeAmount);
|
||||
|
||||
void HandleAuraEffectSpecificMods(bool apply, bool Real, bool changeAmount);
|
||||
int32 CalculateCrowdControlAuraAmount(Unit * caster);
|
||||
|
||||
// add/remove SPELL_AURA_MOD_SHAPESHIFT (36) linked auras
|
||||
|
||||
@@ -615,6 +615,8 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
||||
case SPELL_AURA_TRACK_RESOURCES:
|
||||
case SPELL_AURA_TRACK_STEALTHED:
|
||||
return SPELL_TRACKER;
|
||||
case SPELL_AURA_PHASE:
|
||||
return SPELL_PHASE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -649,6 +651,7 @@ bool IsSingleFromSpellSpecificPerTarget(uint32 spellSpec1,uint32 spellSpec2)
|
||||
{
|
||||
switch(spellSpec1)
|
||||
{
|
||||
case SPELL_PHASE:
|
||||
case SPELL_TRACKER:
|
||||
case SPELL_WARLOCK_ARMOR:
|
||||
case SPELL_MAGE_ARMOR:
|
||||
|
||||
@@ -125,6 +125,7 @@ enum SpellSpecific
|
||||
SPELL_WARRIOR_ENRAGE = 25,
|
||||
SPELL_PRIEST_DIVINE_SPIRIT = 26,
|
||||
SPELL_HAND = 27,
|
||||
SPELL_PHASE = 28,
|
||||
};
|
||||
|
||||
#define SPELL_LINKED_MAX_SPELLS 200000
|
||||
|
||||
+9
-4
@@ -5013,10 +5013,10 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
if (AuraEffect * Aur = pVictim->GetAuraEffect(procSpell->Id, effIndex+1, triggeredByAura->GetCasterGUID()))
|
||||
{
|
||||
// Remove aura mods
|
||||
Aur->ApplyModifier(false);
|
||||
Aur->ApplyModifier(false, false, true);
|
||||
Aur->SetAmount(Aur->GetAmount() + spelldmg/* * triggerAmount / 100*/);
|
||||
// Apply extended aura mods
|
||||
Aur->ApplyModifier(true);
|
||||
Aur->ApplyModifier(true, false, true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -8785,10 +8785,14 @@ bool Unit::HasAuraState(AuraState flag, SpellEntry const *spellProto, Unit * Cas
|
||||
return HasFlag(UNIT_FIELD_AURASTATE, 1<<(flag-1));
|
||||
}
|
||||
|
||||
Unit *Unit::GetOwner() const
|
||||
Unit *Unit::GetOwner(bool inWorld) const
|
||||
{
|
||||
if(uint64 ownerid = GetOwnerGUID())
|
||||
return ObjectAccessor::GetUnit(*this, ownerid);
|
||||
{
|
||||
if (inWorld)
|
||||
return ObjectAccessor::GetUnit(*this, ownerid);
|
||||
return ObjectAccessor::GetUnitInOrOutOfWorld(*this, ownerid);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -15278,3 +15282,4 @@ void Unit::OutDebugInfo()
|
||||
sLog.outStringInLine("%u, ", itr->first);
|
||||
sLog.outString();
|
||||
}
|
||||
|
||||
+2
-1
@@ -1386,7 +1386,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
||||
|
||||
Player* GetSpellModOwner() const;
|
||||
|
||||
Unit* GetOwner() const;
|
||||
Unit* GetOwner(bool inWorld = true) const;
|
||||
Guardian *GetGuardianPet() const;
|
||||
Minion *GetFirstMinion() const;
|
||||
Unit* GetCharmer() const;
|
||||
@@ -1820,6 +1820,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
||||
virtual float GetFollowAngle() const { return M_PI/2; }
|
||||
|
||||
void OutDebugInfo();
|
||||
virtual bool isBeingLoaded() const { return false;}
|
||||
protected:
|
||||
explicit Unit ();
|
||||
|
||||
|
||||
Reference in new issue
Block a user