megamage
834580f6b2
*Move some Trinity-only functions to the end of file.
...
--HG--
branch : trunk
2009-05-15 16:26:00 -05:00
megamage
5732b8c170
*Remove an unused file.
...
--HG--
branch : trunk
2009-05-15 16:08:28 -05:00
megamage
03cfacb361
*Fix a crash caused by eventai.
...
--HG--
branch : trunk
2009-05-15 14:23:05 -05:00
megamage
c64c834c50
*Fix build.
...
--HG--
branch : trunk
2009-05-15 14:10:31 -05:00
megamage
ff7f023ff1
*Merge.
...
--HG--
branch : trunk
2009-05-15 13:57:10 -05:00
megamage
e826b482a5
*Skip not needed tc1 patches
...
--HG--
branch : trunk
2009-05-15 13:53:32 -05:00
megamage
0f3506e90a
*Remove not needed TC1 sql.
...
--HG--
branch : trunk
2009-05-15 13:51:58 -05:00
megamage
9f31ecbdec
*Skip all unused TC1 revs.
...
--HG--
branch : trunk
2009-05-15 13:50:30 -05:00
megamage
c15bae5871
[7832] Better check at petcreateinfo_spell loading for errors and redundend data. Author: VladimirMangos
...
--HG--
branch : trunk
2009-05-15 13:45:34 -05:00
megamage
a442a9b914
[7831] Prevent have hunter pet with level greater player levels at level changes. Propertly set hunter pet xp values at level update. Author: VladimirMangos
...
--HG--
branch : trunk
2009-05-15 13:44:49 -05:00
megamage
0d715cfd8f
*remove UNIT_FLAG2_FORCE_MOVE when loading players. This fix the bug that players cannot stop moving forward. By Bulkin.
...
--HG--
branch : trunk
2009-05-15 13:39:48 -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
X-Savior
f1fd3ad040
*Update some spell/script sql data
...
--HG--
branch : trunk
2009-05-15 19:01:56 +02:00
QAston
02bc76455a
*Fix build.
...
--HG--
branch : trunk
2009-05-15 18:30:34 +02:00
QAston
d81352b421
*Allow hots to proc
...
--HG--
branch : trunk
2009-05-15 16:59:27 +02:00
QAston
4a20e22af3
*Do not proc relentless strikes with slice and dice twice
...
*Fix trap radius calculation in some cases-by krz
--HG--
branch : trunk
2009-05-15 16:51:26 +02:00
QAston
ab195a1031
*Add sqls for latest commit.
...
--HG--
branch : trunk
2009-05-15 18:09:44 +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
Anubisss
e6cd40a619
*Implement GetSpellCooldowns() for get m_spellCooldowns(Player's map of spell CDs).
...
--HG--
branch : trunk
2009-05-15 17:54:10 +02:00
BroodWyrm
7549076a38
*Rewrite Moroes Script to fix reset bug
...
--HG--
branch : trunk
2009-05-15 16:52:59 +02:00
QAston
ae461a4158
*Fix Cheat Death.
...
--HG--
branch : trunk
2009-05-15 15:33:23 +02:00
Genars & Aokromes
854e791c2f
New server options to block adding GMs to friends by players and to block inviting GMs to parties
...
--HG--
branch : trunk
2009-05-14 23:07:17 +02:00
megamage
662dbb9744
*Fix a typo that cause crash. Thanks to Drahy.
...
--HG--
branch : trunk
2009-05-14 20:02:10 -05:00
megamage
c50e1fc4b6
*Merge.
...
--HG--
branch : trunk
2009-05-14 16:52:01 -05:00
megamage
047cc95388
*Add some distance check functions. By VladimirMangos.
...
--HG--
branch : trunk
2009-05-14 16:50:47 -05:00
Drahy
baa7545346
* Finally updated world_spell_full (contains spell_linked_spell, spell_script_target, spell_required and spell_proc_event)
...
* Please everyone to add patches also to full sqls in the future
--HG--
branch : trunk
2009-05-14 22:57:47 +02:00
megamage
811eee356d
[7825] Fixed typo in comment and var. name. Author: BombermaG
...
--HG--
branch : trunk
2009-05-14 15:38:20 -05:00
megamage
5823e2c471
[7824] Implement use ArmorDamageModifier bonus for armor Author: DiSlord
...
--HG--
branch : trunk
2009-05-14 15:37:56 -05:00
megamage
1390440f14
[7823] Fix ScalingStatValue field size in item_template table. Author: DiSlord
...
--HG--
branch : trunk
2009-05-14 15:37:28 -05:00
megamage
9831dab114
[7822] Avoid declined names form show in case disabled config option with russian client at non-russian realm. Author: Foks
...
--HG--
branch : trunk
2009-05-14 11:59:15 -05:00
megamage
d3839aaaf0
[7821] Fixed typo in comment and var. name. Author: KAPATEJIb
...
--HG--
branch : trunk
2009-05-14 11:58:35 -05:00
megamage
c6407a8b4c
[7820] Fixed typo in [7819] that not allow correct work non-scalling item stats. Author: VladimirMangos
...
--HG--
branch : trunk
2009-05-14 11:58:01 -05:00
megamage
43b84c7b07
Code style and cleanups in item equip checks. Author: VladimirMangos
...
--HG--
branch : trunk
2009-05-14 11:57:25 -05:00
megamage
8782d2d31a
[7819] Correct use item ScalingStatValues data (ScalingStatValues.dbc): Author: DiSlord
...
- ScalingStatDistribution stats multiplier
- Armor bonus from ssv
- Damage from ssv
- Feral AP from ssv
- Feral AP from ssv dps bonus
Use item->StatsCount in apply mods
Not allow equip item if level > ScalingStatDistribution->maxlevel field
TODO find more info about ScalingStatValuesEntry->spellBonus
--HG--
branch : trunk
2009-05-14 11:56:51 -05:00
megamage
bf82601817
[7818] Implement SPELL_AURA_MOD_FACTION_REPUTATION_GAIN. Author: DonTomika
...
--HG--
branch : trunk
2009-05-14 11:56:02 -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
megamage
64bee88f69
*Merge.
...
--HG--
branch : trunk
2009-05-14 11:41:34 -05:00
megamage
1b52fa4206
Backed out changeset: 5201ecc6b309
...
--HG--
branch : trunk
2009-05-14 11:40:02 -05:00
raczman
2ed9222ac9
Fixed build on linux.
...
Tested on Arch linux, still need someone to fixup .vcproj's for windows.
--HG--
branch : trunk
2009-05-14 13:25:35 +02:00
Drahy
f45242b798
* Fix compile error
...
--HG--
branch : trunk
2009-05-14 11:56:15 +02:00
QAston
dbceefb4a1
*Merge
...
--HG--
branch : trunk
2009-05-14 06:38:22 +02:00
QAston
42aa8efe47
Backed out changeset 1f92b07df94a
...
--HG--
branch : trunk
2009-05-14 06:32:35 +02:00
megamage
d1d8177c3f
*Merge.
...
--HG--
branch : trunk
2009-05-13 19:37:00 -05:00
megamage
cd25059f60
*Remove a TC1 file.
...
--HG--
branch : trunk
2009-05-13 19:35:00 -05:00
megamage
22f34d1b74
*Merge.
...
--HG--
branch : trunk
2009-05-13 19:34:10 -05:00
megamage
eaf0f7d44a
*Merge.
...
--HG--
branch : trunk
2009-05-13 19:28:55 -05:00
megamage
aed17ae5c3
*Add indices in waypoint converter to greatly improve its speed. By sparc.
...
--HG--
branch : trunk
2009-05-13 18:38:49 -05:00
megamage
7c373f24d8
[7817] Add missing sql-updates to mangos.sql (7776, 7777, 7782) Author: Brueggus
...
--HG--
branch : trunk
2009-05-13 18:30:32 -05:00
megamage
5457286416
[7815] Apply mangos code style: Replace tabs by spaces in recent added code. Author: VladimirMangos
...
--HG--
branch : trunk
2009-05-13 18:28:21 -05:00
megamage
15936b4197
Updated OpenSSL lib to OpenSSL 0.9.8k Author: tomrus88
...
--HG--
branch : trunk
2009-05-13 18:27:44 -05:00
megamage
cd2857fc3f
[7813] Fixed build x64 debug on win. Author: AlexDereka
...
--HG--
branch : trunk
2009-05-13 18:26:11 -05:00
megamage
1d6d0f59b5
[7812] Fixed compile ACE aio in linux. Author: Derex
...
--HG--
branch : trunk
2009-05-13 18:25:40 -05:00
megamage
88107fa1d6
[7811] do not reload already loaded map coordinats at runtime. Author: Ambal
...
--HG--
branch : trunk
2009-05-13 18:24:35 -05:00
megamage
25e5c99dec
[7810] Moved ZThread related code on ACE framework. Author: Ambal
...
Remove ZThread source code from mangos.
--HG--
branch : trunk
2009-05-13 18:22:21 -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
QAston
9056165453
*Fix sudden death proc execute damage.
...
--HG--
branch : trunk
2009-05-13 18:00:07 +02:00
megamage
80c1901343
*Add script for Gothik. Please apply 3233_world_scripts_naxx.sql for new contents.
...
--HG--
branch : trunk
2009-05-13 10:59:00 -05:00
megamage
8994cbe081
*Update some script functions.
...
--HG--
branch : trunk
2009-05-13 10:54:11 -05:00
megamage
4cf3ca42f0
*Process events for dead creatures. This allows delayed spells to work after caster is dead.
...
--HG--
branch : trunk
2009-05-13 10:53:31 -05:00
megamage
f1fed2d947
*Allow passive unit to call entercombat function.
...
--HG--
branch : trunk
2009-05-13 10:52:55 -05:00
megamage
a635613285
*Fix a typo in world_spell_full.sql
...
--HG--
branch : trunk
2009-05-13 10:52:27 -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
raczman
bfaaa8201e
Possibly fixed more memory leaks in other places.
...
--HG--
branch : trunk
2009-05-13 14:06:33 +02:00
raczman
5748c36621
Properly deallocate memory in tile assembler, and dereference memory when fread fails.
...
--HG--
branch : trunk
2009-05-13 13:22:43 +02:00
Drahy
a0a6efd89e
* Completely redone trinityscript_script_texts sql - never again :-)
...
* Cleaned up world_scripts_full
* Used trinity sql coding style for sql updates
--HG--
branch : trunk
2009-05-13 12:42:56 +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
QAston
11e66c1cf0
*Fix the bug that some spells cannot proc.
...
--HG--
branch : trunk
2009-05-13 00:18:20 +02:00
megamage
1fbc7377d1
*Do not show error for not assigned example scripts.
...
--HG--
branch : trunk
2009-05-12 11:16:26 -05:00
megamage
d4aa5605d4
*Add some script sqls missing in full.
...
--HG--
branch : trunk
2009-05-12 10:55:24 -05: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
megamage
df4e8b456b
*Move MoveFollow owner from MoveTargetedHome to enterevademode.
...
--HG--
branch : trunk
2009-05-12 10:11:54 -05:00
megamage
65b10830b8
*Fix a bug that arena never ends if the last player is killed with spirit of redemption talent.
...
--HG--
branch : trunk
2009-05-12 10:01:09 -05:00
Aokromes
a882c4538a
New configuration option: GM.Visible
...
regulates visibility of GM at login.
--HG--
branch : trunk
2009-05-12 08:22:06 +02:00
megamage
2024577488
*Try to fix build in Linux.
...
--HG--
branch : trunk
2009-05-12 00:52:16 -05:00
QAston
a9349e06ba
*Fix a typo
...
--HG--
branch : trunk
2009-05-11 23:52:50 +02: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
d7d81cea1a
*Merge.
...
--HG--
branch : trunk
2009-05-11 13:28:10 -05: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
91558b8b29
*Try to fix build in Linux.
...
--HG--
branch : trunk
2009-05-11 13:15:16 -05:00
Drahy
bb0d592a10
* Fixed compile error - thx Megamage
...
--HG--
branch : trunk
2009-05-11 19:31:48 +02:00
megamage
f631b2a2d6
*Update creature AI functions.
...
--HG--
branch : trunk
2009-05-11 11:46:48 -05:00
megamage
5658963117
*Update Naxx scripts.
...
--HG--
branch : trunk
2009-05-11 03:17:48 -05:00
megamage
f9f5d078fd
*Update instance script functions.
...
--HG--
branch : trunk
2009-05-11 03:17:13 -05:00
megamage
4fef015112
*Update Naxx scripts.
...
--HG--
branch : trunk
2009-05-10 22:50:15 -05:00
megamage
82f886e3c1
*Update AI scripts. Use better default AI.
...
--HG--
branch : trunk
2009-05-10 22:48:22 -05:00
megamage
904300b4c2
*Use better summon positions for summon spells with more than one summons. (Still a temp fix)
...
--HG--
branch : trunk
2009-05-10 22:47:03 -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
55d52e22a8
*Fix build.
...
--HG--
branch : trunk
2009-05-10 16:31:43 -05:00
megamage
dcf41256dd
*Move some AI functions to core. No real change.
...
--HG--
branch : trunk
2009-05-10 16:07:49 -05:00
Anubisss
518ac83fbf
*Fix two typos.
...
--HG--
branch : trunk
2009-05-10 23:06:39 +02:00
megamage
bcb2368faf
*Merge.
...
--HG--
branch : trunk
2009-05-10 14:58:28 -05:00
megamage
ff3332f066
[7809] Replace repeating "remove cooldown and send update to client" code by function call. Author: VladimirMangos
...
--HG--
branch : trunk
2009-05-10 14:51:51 -05:00
megamage
b8e82a23a6
[7808] Move corpse search code in function with template arg for class-check. Author: Astellar
...
This let reuse code for other similar near corpse target selection spells.
Also provided currently not used class-checks for 2 spells
--HG--
branch : trunk
2009-05-10 14:47:56 -05:00
megamage
f8645d8706
[7807] Drop dead code after switch to 3.0.x. Author: VladimirMangos
...
--HG--
branch : trunk
2009-05-10 14:45:06 -05:00