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
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
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
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
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
Muhaha
62c5720227
* avoid loot/exp when the mobs are killed by npc. Authore: KAPATEJIb @ getmangos.org
...
--HG--
branch : trunk
2009-05-13 10:34:55 +02:00
megamage
722701381b
*Do not allow a spell proc itself. This fixes the crash caused by item 32500.
...
--HG--
branch : trunk
2009-05-12 10:25:47 -05:00
QAston
51b5f2aa64
*Allow Hots to proc-this should fix talents like 33776 effect from hots.
...
--HG--
branch : trunk
2009-05-11 23:46:45 +02:00
megamage
82f886e3c1
*Update AI scripts. Use better default AI.
...
--HG--
branch : trunk
2009-05-10 22:48:22 -05:00
megamage
40a8e6d3ab
*Rename some script functions (no real change).
...
--HG--
branch : trunk
2009-05-10 14:29:28 -05:00
QAston
53b3c9a6dc
*Fix trap radius calculation in some cases-by krz
...
--HG--
branch : trunk
2009-05-10 19:21:39 +02:00
QAston
fcf0fdc1c1
*Item enchancment/proc patch - original code by Thenecromancer
...
--HG--
branch : trunk
2009-05-10 18:06:22 +02:00
megamage
aba285664f
*Fix the bug that totem can only apply the first aura effect.
...
--HG--
branch : trunk
2009-05-10 01:19:39 -05:00
megamage
883c2ef77d
*Do not allow persistant auras from the same caster stack on target.
...
--HG--
branch : trunk
2009-05-09 22:31:53 -05:00
megamage
a7f663a748
*Fix a bug of teleport visual effect.
...
--HG--
branch : trunk
2009-05-09 19:58:30 -05:00
megamage
bd33ebf6d3
[7801] Apply damage mods from scripts or target state not in DealDamage but in new function before send data to client. Author: VladimirMangos
...
* Fixed bug with health decrease (client side visual bug) at spell damage by target with AI::DamageTaken damage set to 0
* Fixed bug with ignore .die command and instant kill damage in some cases.
--HG--
branch : trunk
2009-05-08 19:20:28 -05:00
megamage
1fb48b3e34
[7799] Use single function for SMSG_SPELLNONMELEEDAMAGELOG prepare. Merge comments, replace values by enums. Author: VladimirMangos
...
--HG--
branch : trunk
2009-05-08 19:01:40 -05:00
megamage
5346498dea
*Update sapphiron script (not finished yet).
...
--HG--
branch : trunk
2009-05-08 18:39:04 -05:00
megamage
979073cebd
*Update some spell attr flag. Use better way to check IsRangedSpell and UnaffectedByInvulnerability
...
--HG--
branch : trunk
2009-05-08 00:49:02 -05:00
QAston
e8474f3291
*Do not allow to cast cyclone on divine shielded target.
...
--HG--
branch : trunk
2009-05-08 00:37:13 +02:00
megamage
e0a6e3aedc
*Simply some writing of array pointer in aura functions.
...
--HG--
branch : trunk
2009-05-07 17:21:07 -05:00
megamage
22eeafa996
*Remove all auras/summons also for deathstate dead and corpse. This should fix the bug that sometimes players become invulnerable after fall below texture.
...
--HG--
branch : trunk
2009-05-07 17:11:38 -05:00
QAston
f06e8608cb
*Fix demonic knowledge
...
*Fix applying of some cast mods
*Set correct dr for shattered barrier.
--HG--
branch : trunk
2009-05-07 22:38:09 +02:00
megamage
a6d42cd8e4
[7787] Apply death preventing buffs after absorbing damage Author: Maxxie
...
*Note: this rev may need check
--HG--
branch : trunk
2009-05-06 16:54:22 -05:00
megamage
27d3ebbb92
[7777] Fixed talent 30299 and ranks procing also from holy dmg. Author: Corfen
...
--HG--
branch : trunk
2009-05-06 16:38:05 -05:00
megamage
50b336e2cd
*Fix a bug that seal of Righteousness deals too much damage.
...
--HG--
branch : trunk
2009-05-06 16:26:46 -05:00
megamage
fa1dcd16cf
*Update summon system.
...
--HG--
branch : trunk
2009-05-06 13:34:11 -05:00
QAston
9de6139a39
*Fix a crash.
...
--HG--
branch : trunk
2009-05-06 18:22:46 +02:00
megamage
22667d3ee6
*Update script of heigan.
...
--HG--
branch : trunk
2009-05-06 09:36:51 -05:00