megamage
ec24442af4
*Fix rock shards spell for archavon script.
...
--HG--
branch : trunk
2009-05-23 01:43:46 -05:00
megamage
32064b79da
*Do not remove/add aura for refreshing case.
...
--HG--
branch : trunk
2009-05-21 14:54:22 -05:00
megamage
4ed847a6e3
*Implement spell effect wmo damage.
...
--HG--
branch : trunk
2009-05-21 10:01:03 -05:00
megamage
6473e94358
*Update Naxx scripts. Now only Kelthuzad is incompleted
...
--HG--
branch : trunk
2009-05-20 11:44:38 -05:00
megamage
e8be2f026e
*Add some scripted spells for naxx.
...
--HG--
branch : trunk
2009-05-18 15:04:05 -05:00
megamage
e45c57f298
*Fix the bug that startfall aoe damage also apply on direct target.
...
*Add starfall spell bonus for other ranks. By Uruviel and Nesocip.
--HG--
branch : trunk
2009-05-18 10:22:43 -05:00
megamage
5784d03121
*Fix the bug that inferno and curse of doom summons too many minions.
...
--HG--
branch : trunk
2009-05-17 17:33:39 -05:00
megamage
1c134f81e3
*Merge.
...
--HG--
branch : trunk
2009-05-17 16:40:40 -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
14edc1e5eb
*Update naxx script.
...
--HG--
branch : trunk
2009-05-16 14:49:58 -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
megamage
15c78a728e
*Skip Mangos ([7833] Implement levelup spells for non-hunter pets. Author: VladimirMangos)
...
--HG--
branch : trunk
2009-05-15 16:36:59 -05:00
megamage
834580f6b2
*Move some Trinity-only functions to the end of file.
...
--HG--
branch : trunk
2009-05-15 16:26:00 -05:00
QAston
d81352b421
*Allow hots to proc
...
--HG--
branch : trunk
2009-05-15 16:59:27 +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
megamage
8fc07d443a
*Change waypoint data structure. Use creature db guid as path id. If a 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
2009-05-11 13:27:10 -05:00
megamage
82f886e3c1
*Update AI scripts. Use better default AI.
...
--HG--
branch : trunk
2009-05-10 22:48:22 -05:00
QAston
50bf49bd81
Allow class specific periodic dummy and dummy auras to always stack
...
--HG--
branch : trunk
2009-05-11 00:05:36 +02: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
a3447b294d
*Update Naxx scripts.
...
--HG--
branch : trunk
2009-05-06 00:08:19 -05:00
QAston
6998da2028
*Fix chains of ice
...
*Correct typo in my prev commit-by megamage
*Fix hearthstone obtaining from innkeeper.
--HG--
branch : trunk
2009-05-04 18:31:37 +02:00
megamage
1cfc04f1f5
[7745] Fixed gcc warnings. Author: AlexDereka
...
--HG--
branch : trunk
2009-05-03 22:21:46 -05:00
megamage
84fc76439c
*Fix a crash caused by feedpet.
...
*Also have delay for jump spells.
--HG--
branch : trunk
2009-05-03 16:29:33 -05:00
megamage
193b0634df
*Some fix of sapphiron script.
...
--HG--
branch : trunk
2009-05-03 11:28:14 -05:00
QAston
f9b13b45e0
*Fix grounding totem.
...
*Fix runic power regeneration of butchery
*Fix some problems with master of subtlety buff expire.
*Do not allow arcane intellect and brillance to stack.
--HG--
branch : trunk
2009-05-03 16:55:09 +02:00
QAston
abe9b27ee4
*Fix target selection for wild growth and circle of healing
...
--HG--
branch : trunk
2009-05-03 00:02:02 +02:00
megamage
9f0f239e60
*Merge.
...
*Also fix build in VC7 and VC8.
--HG--
branch : trunk
2009-05-02 13:30:55 -05:00
megamage
f303ee08c5
*Update spell selection.
...
--HG--
branch : trunk
2009-05-02 11:28:11 -05:00
QAston
a1f73a8a08
*More correct handling of fly mod auras.
...
*Pets now learn all levelup spells.
*Fix lightning overload.
--HG--
branch : trunk
2009-05-02 16:08:52 +02:00
megamage
db817d668a
*Merge.
...
--HG--
branch : trunk
2009-05-01 18:37:32 -05:00
megamage
5a66774008
*Fix the bug that shapeshift can remove blind.
...
--HG--
branch : trunk
2009-05-01 15:36:32 -05:00
Iskander
77bd6f148a
*Do not allow 2 same blessings to stack
...
--HG--
branch : trunk
2009-05-01 19:23:10 +02:00
QAston
0f5a9cb46f
*Implement enchanting vellums.
...
--HG--
branch : trunk
2009-05-01 15:40:49 +02:00
megamage
8a57a94eca
*Merge.
...
--HG--
branch : trunk
2009-04-30 23:38:21 -05:00
megamage
d44d827200
*Explicitly implement spell target 28 and 29.
...
--HG--
branch : trunk
2009-04-30 22:04:15 -05:00
QAston
c3c303fb99
*Correctly trigger avenging wrath marker.
...
--HG--
branch : trunk
2009-04-29 21:43:59 +02:00
QAston
3e45bb2bfb
*Fix Blessing of Sanctuary
...
--HG--
branch : trunk
2009-04-29 20:33:49 +02:00
megamage
de11b9e901
[7730] Some optimizantion and code style. Author: zhenya
...
--HG--
branch : trunk
2009-04-29 00:26:07 -05:00
megamage
94e25701ad
*Fix the bug that neutural npc aggro players.
...
*Fix build.
--HG--
branch : trunk
2009-04-25 18:46:07 -05:00
QAston
ec4031be35
*Fix improved shadowform.
...
--HG--
branch : trunk
2009-04-25 20:36:31 +02:00
QAston
a00563a127
*Fix deadly brew.
...
*Some changes in flag SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY.
--HG--
branch : trunk
2009-04-25 18:53:29 +02:00
megamage
c4e6f9708f
[7713] Fix AreaGroup.dbc structure, more correct check it Author: DiSlord
...
--HG--
branch : trunk
2009-04-25 09:06:43 -05:00
QAston
e23ec703fe
*Trigger offhand hit for Whirlwind
...
*Allow to cast conflagrate if target is affected by shadowflame
--HG--
branch : trunk
2009-04-25 13:58:26 +02:00
QAston
066af701d3
*Fix frenzy and Ferocious Inspiration proc.
...
*Add command .reset all pet_spells - use it if you still have problems with pet talents after recent revs changes (like pets with all talents for example)
--HG--
branch : trunk
2009-04-23 20:57:17 +02:00
QAston
68b02ae227
*Fix bug that pets learn talents instantly - clear your pet_spell table to have changes applied.
...
--HG--
branch : trunk
2009-04-20 23:37:47 +02:00
QAston
dcc7b99982
*Update petLevelupSpellLearn code
...
*Remove triggered aura of shadow embrace when main aura expires.
--HG--
branch : trunk
rename : sql/updates/2773_world_spell_linked_spell.sql => sql/updates/2814_world_spell_linked_spell.sql
2009-04-19 20:45:55 +02:00
Machiavelli
99fc17d44f
* Tabs to spaces cleanup
...
--HG--
branch : trunk
2009-04-19 18:48:20 +02:00
QAston
a23df5a270
*Fix compile.
...
--HG--
branch : trunk
2009-04-19 17:29:17 +02:00