aboutsummaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-15 17:20:54 -0500
committermegamage <none@none>2009-04-15 17:20:54 -0500
commit02003cc338bb9ea5a8428ee068d618af5940b145 (patch)
treed6c3425180e032405d5ac591c21c4109d5dd739c /src/game
parentb76e8cfa5cf4791a9227b266569e9478d8a8298a (diff)
parente3bd7fed4e06827ed1337dd80f85e83304ba28fe (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'src/game')
-rw-r--r--src/game/Player.cpp1
-rw-r--r--src/game/Spell.cpp8
-rw-r--r--src/game/SpellAuras.cpp5
-rw-r--r--src/game/SpellAuras.h1
-rw-r--r--src/game/StatSystem.cpp2
-rw-r--r--src/game/Unit.cpp11
-rw-r--r--src/game/Unit.h8
7 files changed, 18 insertions, 18 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 65a3adae6b8..803f2b5ecef 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -3240,6 +3240,7 @@ void Player::_LoadSpellCooldowns(QueryResult *result)
// some cooldowns can be already set at aura loading...
//QueryResult *result = CharacterDatabase.PQuery("SELECT spell,item,time FROM character_spell_cooldown WHERE guid = '%u'",GetGUIDLow());
+
if(result)
{
time_t curTime = time(NULL);
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 25149245037..ec07bde8f72 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1108,8 +1108,8 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
}
unit->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_HITBYSPELL);
- //if(m_customAttr & SPELL_ATTR_CU_AURA_CC)
- //unit->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CC);
+ if(m_customAttr & SPELL_ATTR_CU_AURA_CC)
+ unit->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CC);
}
else
{
@@ -1246,6 +1246,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
_duration = aur ? aur->GetAuraDuration() : -1;
}
triggeredAur->SetAuraDuration(_duration);
+ triggeredAur->SetPermanent(false);
}
}
}
@@ -2212,9 +2213,6 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect* triggeredByAura
if(isSpellBreakStealth(m_spellInfo) )
m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CAST);
- if(!m_IsTriggeredSpell)
- m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ANY_CAST);
-
m_caster->SetCurrentCastedSpell( this );
m_selfContainer = &(m_caster->m_currentSpells[GetCurrentContainer()]);
SendSpellStart();
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index b70da73b6b1..9a682ed22b0 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -1209,11 +1209,10 @@ void Aura::SetStackAmount(uint8 stackAmount)
// Reapply if amount change
if (amount!=part->GetAmount())
{
- bool Real = bool (part->m_spellmod);
// Auras which are applying spellmod should have removed spellmods for real
- part->ApplyModifier(false,Real);
+ part->ApplyModifier(false,true);
part->SetAmount(amount);
- part->ApplyModifier(true, Real);
+ part->ApplyModifier(true,true);
}
}
}
diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h
index 14d43070fe1..698df1f9a30 100644
--- a/src/game/SpellAuras.h
+++ b/src/game/SpellAuras.h
@@ -94,6 +94,7 @@ class TRINITY_DLL_SPEC Aura
void SetNegative() { m_positive = false; }
void SetPositive() { m_positive = true; }
bool IsPermanent() const { return m_permanent; }
+ void SetPermanent(bool val) { m_permanent = val; }
bool IsPassive() const { return m_isPassive; }
bool IsDeathPersistent() const { return m_isDeathPersist; }
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp
index f9d237b9d5e..c24999e8fe5 100644
--- a/src/game/StatSystem.cpp
+++ b/src/game/StatSystem.cpp
@@ -701,7 +701,7 @@ void Player::UpdateManaRegen()
int32 modManaRegenInterrupt = GetTotalAuraModifier(SPELL_AURA_MOD_MANA_REGEN_INTERRUPT);
if (modManaRegenInterrupt > 100)
modManaRegenInterrupt = 100;
- SetStatFloatValue(UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER, (power_regen_mp5 + power_regen) * modManaRegenInterrupt / 100.0f);
+ SetStatFloatValue(UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER, power_regen_mp5 + power_regen * modManaRegenInterrupt / 100.0f);
SetStatFloatValue(UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER, power_regen_mp5 + power_regen);
}
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 0ee053745aa..1e403577dbd 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -9017,10 +9017,11 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
break;
}
}
- coeff = (CastingTime / 3500.0f) * DotFactor;
+ // As wowwiki says: C = (Cast Time / 3.5) * 1.88 (for healing spells)
+ coeff = (CastingTime / 3500.0f) * DotFactor * 1.88f;
}
- float coeff2 = CalculateLevelPenalty(spellProto) * 1.88f * stack;
+ float coeff2 = CalculateLevelPenalty(spellProto)* stack;
TakenTotal += TakenAdvertisedBenefit * coeff * coeff2;
if(Player* modOwner = GetSpellModOwner())
{
@@ -9043,7 +9044,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
// Rejuvenation, Regrowth, Lifebloom, or Wild Growth
if (pVictim->GetAura(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_DRUID, 0x50, 0x4000010, 0))
//increase healing by 20%
- DoneTotalMod *= 1.2f;
+ TakenTotalMod *= 1.2f;
}
// Taken mods
@@ -9069,11 +9070,11 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
if(damagetype==DOT)
{
// Healing over time taken percent
- float minval_hot = GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HOT_PCT);
+ float minval_hot = pVictim->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HOT_PCT);
if(minval_hot)
TakenTotalMod *= (100.0f + minval_hot) / 100.0f;
- float maxval_hot = GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HOT_PCT);
+ float maxval_hot = pVictim->GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HOT_PCT);
if(maxval_hot)
TakenTotalMod *= (100.0f + maxval_hot) / 100.0f;
}
diff --git a/src/game/Unit.h b/src/game/Unit.h
index 4559bd97bba..3e7a93bad1f 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -59,9 +59,9 @@ enum SpellChannelInterruptFlags
enum SpellAuraInterruptFlags
{
- AURA_INTERRUPT_FLAG_ANY_CAST = 0x00000001, // 0 removed by any cast
+ AURA_INTERRUPT_FLAG_HITBYSPELL = 0x00000001, // 0 removed when getting hit by a negative spell?
AURA_INTERRUPT_FLAG_DAMAGE = 0x00000002, // 1 removed by any damage
- AURA_INTERRUPT_FLAG_HITBYSPELL = 0x00000004, // 2 removed when getting hit by a negative spell? aoe damage?
+ AURA_INTERRUPT_FLAG_CC = 0x00000004, // 2 crowd control
AURA_INTERRUPT_FLAG_MOVE = 0x00000008, // 3 removed by any movement
AURA_INTERRUPT_FLAG_TURNING = 0x00000010, // 4 removed by any turning
AURA_INTERRUPT_FLAG_JUMP = 0x00000020, // 5 removed by entering combat
@@ -71,8 +71,8 @@ enum SpellAuraInterruptFlags
AURA_INTERRUPT_FLAG_NOT_SHEATHED = 0x00000200, // 9 removed by unsheathing
AURA_INTERRUPT_FLAG_TALK = 0x00000400, // 10 talk to npc / loot? action on creature
AURA_INTERRUPT_FLAG_USE = 0x00000800, // 11 mine/use/open action on gameobject
- AURA_INTERRUPT_FLAG_ATTACK = 0x00001000, // 12 removed by attacking (negative spell cast?)
- AURA_INTERRUPT_FLAG_CAST = 0x00002000, // 13 cast stealth breaking spell
+ AURA_INTERRUPT_FLAG_ATTACK = 0x00001000, // 12 removed by attacking
+ AURA_INTERRUPT_FLAG_CAST = 0x00002000, // 13 ???
AURA_INTERRUPT_FLAG_UNK14 = 0x00004000, // 14
AURA_INTERRUPT_FLAG_TRANSFORM = 0x00008000, // 15 removed by transform?
AURA_INTERRUPT_FLAG_UNK16 = 0x00010000, // 16