Age | Commit message (Collapse) | Author |
|
--HG--
branch : trunk
|
|
*Temporary remove assert check in Player::RestoreSpellMods
*Apply bleeding damage bonuses for Shred.
--HG--
branch : trunk
|
|
*Spell_affect entry for Fingers of frost - by Larva
*use spellaffect entries in every affect check
*Allow spell_affect table to modify affect data for any spell
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
*Implement SPELL_ATTR_EX6_IGNORE_CASTER_AURAS
*Fix some bugs with traps proc flags
--HG--
branch : trunk
|
|
triggered.
*Provide spell support for quest 12698
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
with possitive aura value. Author: VladimirMangos
--HG--
branch : trunk
|
|
thenecromancer
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
better fit to current table use. Author: VladimirMangos
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
overwrite another. Need better rules to check that. (see my comment in code)
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
*Do not remove rougue poisons and dk runes on arena start.
*Apply healing bonus for healing stream totem.
*Do not duplicate damage bonus in code with the one in db for Seal of Vengenance/Corruption
--HG--
branch : trunk
|
|
This is first commit in chain for remove oudated and not used pet functionality.
* Use instead dropped table CreatureSpellData.dbc if creature_template.PetSpellDataId set (mostly hunter pets)
* Use creature_template.spellN if not set creature_template.PetSpellDataId (mostly different summon creatures)
* Fixed bug with not removing from action bar spell icon for not ranked unlearned spells.
Note: summoned controllable creatures without PetSpellDataId must have expected spells in spellN feilds for creature_template.
[7887] Drop pet spell teaching code, including field in character_pet.
Author: VladimirMangos
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
case-this prevents some problem with spelleffects execution problems
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
Thank you.
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
*Add starfall spell bonus for other ranks. By Uruviel and Nesocip.
--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
|
|
--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
|
|
VladimirMangos)
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--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
|
|
this fixes 13048 and 12292.
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
creature uses waypoint movement as default movement type, the path id should be DBGUID*10. For paths of script use, the path id should be DBGUID*10+1 ~ DBGUID*10+9.
*Two sql queries are included. Converter is used to convert the existing path id to new path id. "...creature_add..." is used to change table structure. You can first run the converter, then run the other one. Or run the other one directly and get the new data from the db team. Because it may take hours to run the converter.
*If you have custom data, you may need to run the converter. We suggest you use console to run it It is extremely slow to run the query. If you have multiple paths for a creature in your db, you need to do more work to convert it. However, if you know how to use multiple paths, you should already have more db knowledge than I do and you should know how to convert it.
*There may be a faster query to convert the db. If you know, please tell us. I am no sql expert.
*Backup your db first!
*Thanks to X-Savior and subhuman_bob.
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
UnaffectedByInvulnerability
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
--HG--
branch : trunk
|
|
*Correct typo in my prev commit-by megamage
*Fix hearthstone obtaining from innkeeper.
--HG--
branch : trunk
|