Age | Commit message (Collapse) | Author |
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
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
|
|
xILOSWag
--HG--
branch : trunk
|
|
* ignore 0.0f min range limit (this correct case when 2 object overlapped)
Also use int32 for temporary store GetSessionDbLocaleIndex result.
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
not spawn instance bosses outside the instance. They may make server crash like hell.
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
*Fix build.
--HG--
branch : trunk
|
|
in it.
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
*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
|
|
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
|
|
PetSpellMap. Author: VladimirMangos
--HG--
branch : trunk
|
|
* Better integration creature event ai strings.
* Not inclide in checks as expected max mangos strings range value to range
--HG--
branch : trunk
|
|
VladimirMangos)
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
redundend data. Author: VladimirMangos
--HG--
branch : trunk
|
|
changes. Propertly set hunter pet xp values at level update. Author: VladimirMangos
--HG--
branch : trunk
|
|
players cannot stop moving forward. By Bulkin.
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
*Fix trap radius calculation in some cases-by krz
--HG--
branch : trunk
|
|
-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
|
|
--HG--
branch : trunk
|
|
*Thanks QAston for the help in the SpellFamilyMask.
--HG--
branch : trunk
|
|
spell CDs).
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
inviting GMs to parties
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
russian client at non-russian realm. Author: Foks
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
stats. Author: VladimirMangos
--HG--
branch : trunk
|