megamage
a22aedf320
*Fix build.
...
--HG--
branch : trunk
2009-05-23 10:16:40 -05:00
megamage
bfac33f24f
*Try to fix an aura bug that cause server freeze
...
--HG--
branch : trunk
2009-05-23 10:04:12 -05:00
QAston
73faabbc49
*Fix a crash.
...
--HG--
branch : trunk
2009-05-23 11:26:08 +02:00
QAston
4d9bce3270
*Allow healing mod auras to affect SPELL_DAMAGE_CLASS_NONE spells
...
--HG--
branch : trunk
2009-05-23 11:12:13 +02:00
QAston
9af492483e
*always remove old aura instead of recalculating new one in same id stack case-this prevents some problem with spelleffects execution problems
...
--HG--
branch : trunk
2009-05-23 10:57:05 +02:00
megamage
2e46b7e65d
[7876] Implemented dummy effect /*and special target selection*/ for 52759. Author: ApoC
...
--HG--
branch : trunk
2009-05-22 16:49:37 -05:00
megamage
3641be039b
*Set pvp flags for units controlled by player.
...
*Reset pvp flags when unit is uncharmed.
*Remove walk flag when unit is charmed.
--HG--
branch : trunk
2009-05-22 03:12:35 -05:00
megamage
67255e536b
*Fix a infinite loop introduced in 3453. Thanks to QAston and Drahy.
...
--HG--
branch : trunk
2009-05-21 17:18:44 -05:00
megamage
31005dab82
*Fix a infinite loop introduced in 3444.
...
--HG--
branch : trunk
2009-05-21 15:17:51 -05:00
megamage
32064b79da
*Do not remove/add aura for refreshing case.
...
--HG--
branch : trunk
2009-05-21 14:54:22 -05:00
QAston
1403419164
*Fix reckonging
...
*fix Sword and Board
*Fix Vigilance
*Rollback sw:death fix.
--HG--
branch : trunk
2009-05-21 20:02:22 +02:00
megamage
6d6a4a7856
[7864] Use x.0f float constant format. Author: NoFantasy
...
--HG--
branch : trunk
2009-05-21 10:52:35 -05:00
megamage
8d771cc9f7
[7862] Fixed infinity loop at search spell related summoned gameobject in owner list. Author: VladimirMangos
...
--HG--
branch : trunk
2009-05-21 10:51:18 -05:00
megamage
67c84b1f3d
Mobs fleeing and getting assistance feature implementaion. Author: Neo2003
...
--HG--
branch : trunk
2009-05-21 10:48:00 -05:00
megamage
fb0ccbf4aa
[7856] Fix cast 51525 and ranks charge on target (not owner) Author: Astellar
...
--HG--
branch : trunk
2009-05-21 10:09:25 -05:00
megamage
49a39abf8f
*Remove some redundant code in dealdamage.
...
--HG--
branch : trunk
2009-05-20 12:26:14 -05:00
QAston
e348b671e7
*Corret proc from bloodsurge and judgements of the wise
...
*Do not proc backfire dmg from sw:death if target is killed
*Allow hots to proc from selfcast
*Fix glyph of corruption.
--HG--
branch : trunk
2009-05-19 20:33:11 +02:00
QAston
2b47f0c0f7
*Fix Demonic Empowerment.
...
*Some code optimisations.
*Set formalCasterGuid for area auras correctly.
--HG--
branch : trunk
2009-05-19 18:33:49 +02:00
megamage
2a2eff190c
*Fix some bugs about pet spells: such as cannot cast/cannot autocast.
...
--HG--
branch : trunk
2009-05-19 01:23:52 -05:00
QAston
483714d845
*Fix a typo causing healing bonus for spells to be far too low.
...
--HG--
branch : trunk
2009-05-18 22:59:57 +02:00
QAston
7ed391aa92
*Fix beacon of light
...
*Apply healing aura mods to leech auras.
--HG--
branch : trunk
2009-05-18 21:54:11 +02:00
QAston
6c7f2d2b24
*Spell_proc_event entries for Malestorm Weapon - by throneinc
...
*Fix bug that some spells can't proc
*Add spell_proc_event entries for some items.
--HG--
branch : trunk
2009-05-18 19:00:20 +02:00
thenecromancer
d7740fcd17
Correctly interpret SPELL_AURA_MOD_COMBAT_CHANCE DBC values
...
as % modificators instead of flat values.
--HG--
branch : trunk
2009-05-20 22:59:22 +02:00
thenecromancer
6ebfe2f580
Correct behavior of Add Extra Attact spelleffect.
...
Correctly send attack gain in spell log.
Attack right after processing effect
Ignore effect if target not in melee range/angle
--HG--
branch : trunk
2009-05-20 22:39:52 +02:00
megamage
1c134f81e3
*Merge.
...
--HG--
branch : trunk
2009-05-17 16:40:40 -05:00
megamage
b95e67375c
*Move AI function DamageTaken back to DealDamage.
...
--HG--
branch : trunk
2009-05-17 16:38:44 -05:00
QAston
7c6757d7ee
*Update proc system.
...
--HG--
branch : trunk
2009-05-17 18:00:33 +02:00
megamage
3569f949d7
[7839] Rafactoring player targeting code in chat command and related cleanups/improvments.
...
* New extractOptFirstArg function for easy get 2 args in case option playe name as first arg.
* New extractPlayerTarget function for get player pointer/guid/name for online/offline player base at provided name
or if not provided by current seelction with error cases processing.
* Property apply mute/unmute in case use different character name from loggined currently for account.
* .reset commands can be used from console now
* .repairitems comamnd can be used from console now but only to online player.
Author: VladimirMangos
--HG--
branch : trunk
2009-05-17 10:57:55 -05:00
megamage
98e32a041d
*Do not clear unit movement flags when it is stunned/rooted
...
--HG--
branch : trunk
2009-05-17 10:07:11 -05:00
krz
cc85d9e1c4
Properly check if triggering spell can stack with player's aura.
...
That should fix e.g. water shield.
--HG--
branch : trunk
2009-05-17 12:03:54 +02:00
megamage
09407c8757
*Do not allow taunt affect passive creatures.
...
*Fix build.
--HG--
branch : trunk
2009-05-16 15:28:37 -05:00
QAston
bb6e0dba89
*Fix lifebloom final heal coefficient - by nesocip
...
*Fix aura immunity dispel for spells like Resurrection sickness
*Do not proc auras without spellfamilyflags required for totems.
*Allow more auras to be displayed in client.
*Fix some issues with Cut to the Chase.
--HG--
branch : trunk
2009-05-16 20:23:56 +02:00
QAston
14daff6d38
*Change amount of passive auras if mod changed for them (this fixes Glyph of vigor apply/remove and some other spells)
...
*Backfire damage from unstable affliction is applied to dispeller now
*Correct amount of improved Divine Spirit
--HG--
branch : trunk
2009-05-16 17:59:36 +02:00
raczman
10ee81ef13
Moved most randomisation functions usage from static version into Map object.
...
--HG--
branch : trunk
2009-05-16 10:50:39 +02:00
megamage
ff7f023ff1
*Merge.
...
--HG--
branch : trunk
2009-05-15 13:57:10 -05:00
QAston
4b782ccc1d
*Blizzlike calculation of skill required to cast judgement-like spells.
...
--HG--
branch : trunk
2009-05-15 19:40:45 +02:00
QAston
47d5fc51c5
*Item enchancment/proc patch - original code by Thenecromancer
...
-void Player::CastItemCombatSpell(Item *item,Unit* Target, WeaponAttackType attType)
-{
- if(!item || item->IsBroken())
- return;
-
- ItemPrototype const *proto = item->GetProto();
- if(!proto)
- return;
+void Player::CastItemCombatSpell(Item *item, CalcDamageInfo *damageInfo, ItemPrototype const * proto)
+{
+ Unit * Target = damageInfo->target;
+ WeaponAttackType attType = damageInfo->attackType;
if (!Target || Target == this )
return;
- for (int i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
- {
- _Spell const& spellData = proto->Spells[i];
-
- // no spell
- if(!spellData.SpellId )
- continue;
-
- // wrong triggering type
- if(spellData.SpellTrigger != ITEM_SPELLTRIGGER_CHANCE_ON_HIT)
- continue;
-
- SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellData.SpellId);
- if(!spellInfo)
- {
- sLog.outError("WORLD: unknown Item spellid %i", spellData.SpellId);
- continue;
- }
-
- // not allow proc extra attack spell at extra attack
- if( m_extraAttacks && IsSpellHaveEffect(spellInfo,SPELL_EFFECT_ADD_EXTRA_ATTACKS) )
- return;
-
- float chance = spellInfo->procChance;
-
- if(spellData.SpellPPMRate)
- {
- uint32 WeaponSpeed = GetAttackTime(attType);
- chance = GetPPMProcChance(WeaponSpeed, spellData.SpellPPMRate, spellInfo);
- }
- else if(chance > 100.0f)
- {
- chance = GetWeaponProcChance();
- }
-
- if (roll_chance_f(chance))
- CastSpell(Target, spellInfo->Id, true, item);
+ // Can do effect if any damage done to target
+ if (damageInfo->damage)
+ {
+ for (int i = 0; i < 5; i++)
+ {
+ _Spell const& spellData = proto->Spells[i];
+
+ // no spell
+ if(!spellData.SpellId )
+ continue;
+
+ // wrong triggering type
+ if(spellData.SpellTrigger != ITEM_SPELLTRIGGER_CHANCE_ON_HIT)
+ continue;
+
+ SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellData.SpellId);
+ if(!spellInfo)
+ {
+ sLog.outError("WORLD: unknown Item spellid %i", spellData.SpellId);
+ continue;
+ }
+
+ // not allow proc extra attack spell at extra attack
+ if( m_extraAttacks && IsSpellHaveEffect(spellInfo,SPELL_EFFECT_ADD_EXTRA_ATTACKS) )
+ return;
+
+ float chance = spellInfo->procChance;
+
+ if(spellData.SpellPPMRate)
+ {
+ uint32 WeaponSpeed = GetAttackTime(attType);
+ chance = GetPPMProcChance(WeaponSpeed, spellData.SpellPPMRate, spellInfo);
+ }
+ else if(chance > 100.0f)
+ {
+ chance = GetWeaponProcChance();
+ }
+
+ if (roll_chance_f(chance))
+ CastSpell(Target, spellInfo->Id, true, item);
+ }
}
// item combat enchantments
@@ -6993,6 +6993,21 @@
if(pEnchant->type[s]!=ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
continue;
+ SpellEnchantProcEntry const* entry = spellmgr.GetSpellEnchantProcEvent(enchant_id);
+
+ if (entry && entry->procEx)
+ {
+ // Check hit/crit/dodge/parry requirement
+ if((entry->procEx & damageInfo->procEx) == 0)
+ continue;
+ }
+ else
+ {
+ // Can do effect if any damage done to target
+ if (!(damageInfo->damage))
+ continue;
+ }
+
SpellEntry const *spellInfo = sSpellStore.LookupEntry(pEnchant->spellid[s]);
if (!spellInfo)
{
@@ -7001,6 +7016,18 @@
}
float chance = pEnchant->amount[s] != 0 ? float(pEnchant->amount[s]) : GetWeaponProcChance();
+
+ if (entry && entry->PPMChance)
+ {
+ uint32 WeaponSpeed = GetAttackTime(attType);
+ chance = GetPPMProcChance(WeaponSpeed, entry->PPMChance, spellInfo);
+ }
+ else if (entry && entry->customChance)
+ chance = entry->customChance;
+
+ // Apply spell mods
+ ApplySpellMod(pEnchant->spellid[s],SPELLMOD_CHANCE_OF_SUCCESS,chance);
+
if (roll_chance_f(chance))
{
if(IsPositiveSpell(pEnchant->spellid[s]))
@@ -7012,6 +7039,7 @@
}
}
+
void Player::CastItemUseSpell(Item *item,SpellCastTargets const& targets,uint8 cast_count, uint32 glyphIndex)
{
ItemPrototype const* proto = item->GetProto();
--HG--
branch : trunk
2009-05-15 16:37:22 +02:00
QAston
a796012723
*Merge some fixes from tc1
...
--HG--
branch : trunk
2009-05-15 18:00:50 +02:00
Anubisss
ad92f5e210
*Fix Glyph of Ice Block.
...
*Thanks QAston for the help in the SpellFamilyMask.
--HG--
branch : trunk
2009-05-15 17:58:06 +02:00
QAston
ae461a4158
*Fix Cheat Death.
...
--HG--
branch : trunk
2009-05-15 15:33:23 +02:00
megamage
047cc95388
*Add some distance check functions. By VladimirMangos.
...
--HG--
branch : trunk
2009-05-14 16:50:47 -05:00
megamage
657971629c
*Merge. Sorry for the mess. But a rev was wrongly backouted so we have to make these two backouts.
...
--HG--
branch : trunk
2009-05-14 11:47:12 -05:00
megamage
22b082519e
Backed out changeset: 7dcbf5239f55
...
--HG--
branch : trunk
2009-05-14 11:44:27 -05:00
krz
ee40287ef7
Do not allow to proc spells if they can't stack with already active auras.
...
this fixes 13048 and 12292.
--HG--
branch : trunk
2009-05-14 14:35:09 +02:00
Anubisss
9dd5a1c6d7
*Better way in Glyph of Prayer of Healing.
...
--HG--
branch : trunk
2009-05-13 18:37:02 +02:00
QAston
131c29f132
*Merge.
...
--HG--
branch : trunk
2009-05-13 18:33:15 +02:00
QAston
9aab389937
*Better fix for judgements
...
--HG--
branch : trunk
2009-05-13 18:32:32 +02:00
megamage
f1fed2d947
*Allow passive unit to call entercombat function.
...
--HG--
branch : trunk
2009-05-13 10:52:55 -05:00
QAston
cfe64e00e7
*Do not parry/dodge judgements.
...
--HG--
branch : trunk
2009-05-13 17:19:09 +02:00
Farah
8db26443d0
*Fix Glyph of Prayer of healing
...
--HG--
branch : trunk
2009-05-13 17:05:51 +02:00