Commit Graph

113 Commits

Author SHA1 Message Date
Shauren
82f45966fc Core/Unit: Renamed addUnitState/hasUnitState/clearUnitState to AddUnitState/HasUnitState/ClearUnitState
Core/Vehicles: Allow the vehicle to always damage the passenger (removed unneded dbc hacks from scripts)

--HG--
branch : trunk
2010-12-17 13:43:24 +01:00
Anubisss
6d9029c12e Make some cleanup.
My thank goes to Az@zel for the code analysis.

--HG--
branch : trunk
2010-12-16 18:08:23 +01:00
azazel
d2d62eab50 Cleanup: implemented helper methods for manipulating percentage calculation and used it where appropriate (plus fixed some other warnings).
NOTE: Initially I just wanted to fix some warnings, but noticed that there is no common method for percentage calculation and various formulas are used many time in the code making it difficult to read and understand what the code actually does. So, I introduced several template methods for calculating percent values and adding those values to the original base. I replaced all the raw calculations throughout the code where found, but I could have missed something or could have made a mistake. So, please report any strange behaviour after this commit.
If you ask me why I did it: for the sake of consistency and exact understanding what code means. If you see CalculatePct method, you clearly understand, that it find the value of x percent of y. And you can easily express, for example, spell behviour "reduces smth by x%" by the means of a method instead of recalling school maths.

--HG--
branch : trunk
2010-12-11 20:37:38 +06:00
azazel
e7eb4e22e2 Core/Mechanics: cleanup shapeshift form code (by VladimirMangos)
--HG--
branch : trunk
2010-12-09 17:03:42 +06:00
Machiavelli
bbf619c20d Core/Spells: Fix spell damage/healing multipliers for spells that affect multiple targets (ie. Heart Strike, Chain Lightning, Chain Healing)
Author: dr.tenma
Closes issue #4506
Closes issue #1874

--HG--
branch : trunk
2010-12-04 10:31:14 +01:00
Shauren
3badf69b63 Core/Spells: Fixed bad Z coordinate for Spell::EffectBind with location stored in database
Core/Scripts: Corrected few mistakes in misc scripts

--HG--
branch : trunk
2010-12-03 13:54:00 +01:00
Shocker
a23ae5c94c Core/Spells: Implement SPELL_EFFECT_WMO_CHANGE, patch by Heisenberg
Closes issue 4984.

--HG--
branch : trunk
2010-12-01 20:59:05 +02:00
Spp
addd762c4d Core: Fix warnings
--HG--
branch : trunk
2010-11-16 14:08:12 +01:00
Shocker
48d90fab32 Misc: Some engrish fixes, thanks to ZxBiohazardZx, closes issue 4740
--HG--
branch : trunk
2010-11-14 23:46:34 +02:00
linencloth
bb9336ca27 Core/Spells: Effect sanctuary should stop attackers without threatlist too
Closes issue 1943

--HG--
branch : trunk
2010-11-13 20:23:05 +01:00
Shauren
ec49ce5fc3 Core/Spells: Fixed possible crashes in scaling mounts code when player is not in a valid zone
--HG--
branch : trunk
2010-11-13 18:54:33 +01:00
linencloth
880ef0c398 Core/Spells: Fix spelleffect sanctuary
- No longer removes every attacker, but updates the visibility
  - Using that effect won't remove attackers that can still see through the stealth of the caster based on distance
- Ignores spells that were casted before or at the same time of that effect
- Trigger other needed spells when casting Shadowmeld

--HG--
branch : trunk
2010-11-13 18:04:56 +01:00
linencloth
bf888285aa Core:
- Redesigned stealth and invisibility handling
  - Implemented the handling of multiple stealth types
- Implemented fake inebriation
- The message deliverer no longer sends packets from a non-visible source
  - The server won't send that much garbage which just takes bandwith
  - It won't be possible to use cheats to detect invisible objects
- Removed a lot of checks for the Z-coord
  - Fixes visibility problems happening while flying
- Limited the grid activation range of creatures to use less resources
- Implemented Shroud of Death
- Implemented increased visibility range for active objects
- Removed visibility check at spellhit (only sanctuary effects should prevent it)
(And a lot of other changes...)

Closes issue 4208
Closes issue 3049
Closes issue 2097
Closes issue 2198
Closes issue 2384
Closes issue 2197
Closes issue 2319

--HG--
branch : trunk
2010-11-13 17:18:09 +01:00
Xanadu
78a8b09774 Core/Spells: Fixed Vanish not applying stealth. Closes issue #4699.
--HG--
branch : trunk
2010-11-13 06:43:45 +01:00
Shauren
cc220ca7b6 Scripts/Spells: Added script for Animal Blood pool spawning (fixes fishing daily quest "Blood is Thicker")
--HG--
branch : trunk
2010-11-10 11:37:41 +01:00
_manuel_
5674f81e51 Core/Spells: Deterrence should deflect Death Grip.
Fixes issue 4582.

Based on gastuslg´s patch and thanks to click.

--HG--
branch : trunk
2010-11-09 23:02:47 -03:00
Machiavelli
ddc812163a Core/Spells: Fix Shield of Righteousness damage
Author: Dr.Tenma
Fixes issue #4174

--HG--
branch : trunk
2010-11-09 11:15:00 +01:00
click
c58e227ffa Core/Spells: Fix hunter pet namechanging when using Certificate of Ownership (spellID 53987, used by itemID 43850)
(There's also, as far as I know, no window on hunter pet renames, one selects the pet and clicks 'rename').
Closes issue 2967.

--HG--
branch : trunk
2010-11-07 22:23:12 +01:00
Rat
5cb119e617 Core/AI: implemented SmartScripts System (still beta) not 100% complete
WARNING: Use scripts at own risk. You were warned.
NOTE0: creature, gameobject, areatrigger type scripts should be fully functional
NOTE1: has no effect on any core related stuff if not using any SmartScript
NOTE2: all event/action/etc descriptions can be found in SmartScriptMgr.h

SmartScripts is a reloadable DB-Sript system, with full control for special scripting,
like escorting, following, complex combat handling, pre-stored AI templates(caster, turret, etc) and much more
with a total of 66 events, 78 actions, 22 target types, and can be easily extended

--HG--
branch : trunk
2010-10-27 21:01:47 +02:00
Supabad
b7b65eacf2 Core/Spells: Destructable Buildings
- Fix issue where damage can be done to GameObjects with hp 0
- add check for Gameobjects with faction 0

--HG--
branch : trunk
2010-10-19 13:15:47 +02:00
Shocker
e38e590ec8 Core/Spells: Really move spec changing InBattleground check to its correct location
--HG--
branch : trunk
2010-10-16 17:53:33 +03:00
Shocker
c2295e86be Core/Spells: Move hacky check for spec changing to its correct location
--HG--
branch : trunk
2010-10-16 17:44:42 +03:00
click
f0c4241ea4 Remove the accidental additions of CRLF-crap from the header updates
--HG--
branch : trunk
2010-10-07 15:35:36 +02:00
click
a67d7c9afd Copyright header updates - part 3... (and some whitespace cleanups)
--HG--
branch : trunk
2010-10-07 14:00:52 +02:00
click
8ea4b32fab Update copyright headers (following the same standard in all files = good)
--HG--
branch : trunk
2010-10-07 12:41:56 +02:00
QAston
abe769a310 Core/ScriptSystem: Extend SpellScript API by spell focus targets accessors.
--HG--
branch : trunk
2010-10-04 20:32:10 +02:00
Shauren
956f9115dc Core/Spells: Moved checking if item has USE: effect to Spell::CheckItems (from effect handler), also generates blizzlike error message now
--HG--
branch : trunk
2010-09-28 18:50:38 +02:00
Shocker
78803c9f09 Magic numbers cleanup:
- Replace many magic numbers with constants
- Use enum for vehicle flags/seat flags
- Correct structure for ItemRandomSuffixEntry

--HG--
branch : trunk
2010-09-28 08:21:51 +03:00
click
88420cdcd1 Core/Spells: Do not allow adding USE-enhancements on items that already has a Use: spell. Fixes a possible exploit (original fix by Leak)
(Cleaned up to adhere to codingstandards)
Closes issue 4185.

--HG--
branch : trunk
2010-09-27 05:41:13 +02:00
Machiavelli
562e3955a9 Core/Logging: Change some spell log output to debug level instead of error level. Author svetilo12
Fixes issue #3793

--HG--
branch : trunk
2010-09-25 17:53:20 +02:00
Shauren
57df06c7f5 Core/Spells: Fixed power burn effects showing mana restored to caster
Closes issue #4078.

--HG--
branch : trunk
2010-09-25 15:03:48 +02:00
Shauren
d8ddf38453 Core/Items: Implemented trading soulbound loot items
Core/DBLayer: Converted more more player-related queries into prepared statements
Core/Items: Fixed loading of enchantments

Closes issue #4130.

--HG--
branch : trunk
2010-09-21 21:55:16 +02:00
Shocker
4908187578 Core/ScriptMgr: Add hooks for duel phases: OnDuelRequest, OnDuelStart, OnDuelEnd
--HG--
branch : trunk
2010-09-13 01:42:14 +03:00
Shocker
fd52f7b202 Core/Spells: Add level requirement check for glyph sockets
--HG--
branch : trunk
2010-09-08 06:11:32 +03:00
Shauren
1b10bd5d05 Core/Spells: Implemented handler for spell Create Lance, patch by 0xFuture
Closes issue #2890.

--HG--
branch : trunk
2010-09-06 12:22:19 +02:00
Shauren
77130c910f Core/Spells: Fixed Execute formula, patch by dr.tenma
Closes issue #3478.

--HG--
branch : trunk
2010-09-05 14:28:13 +02:00
Shauren
1863960da8 Core/Spell: Fixed Escape artist, patch by Heisenberg
Closes issue #3536.

--HG--
branch : trunk
2010-09-05 13:59:49 +02:00
silinoron
5179d3149a Core/Game: Fix remaining warnings on windows (and most likely almost all of the ones on *nix)
--HG--
branch : trunk
2010-09-03 21:55:57 -07:00
azazel
7884fd927a Spell Scripts:
* moved some generic spell dummy effects to scripts
* implemented two spell scripts for quests: 8913 Sacred Cleansing (Quest 55), 44936 Quest - Fel Siphon Dummy (Quest 11515). Closes issue #3040
* did some cleanup in spell scripts and added more comments

--HG--
branch : trunk
2010-09-04 02:33:57 +06:00
Shauren
e25846a08e Core/Spells: Fixed crash in EffectFeedPet
Closes issue #3728.
Closes issue #3752.

--HG--
branch : trunk
2010-09-02 22:04:08 +02:00
Shauren
15880d27ea Core/Spells: Fixed Health Leech effect, should not apply healing multiplier to damage done
--HG--
branch : trunk
2010-09-02 15:34:36 +02:00
Shocker
c8dfbdac35 Conflagrate direct & DoT damage shouldn't scale with duration increases of Immolate/Shadowflame, fixes issue 3376.
--HG--
branch : trunk
2010-09-02 06:02:51 +03:00
Spp
405f312918 Core: Fix more warnings
--HG--
branch : trunk
2010-08-30 15:25:15 +02:00
azazel
d952c90754 Spell Scripts:
* add new file spell_item.cpp for spells used by items (but not by quests)
* move some dummy effects of generic spells to scripts
* implement spell for quest 12937 Relief for the Fallen. Closes issue #3070

--HG--
branch : trunk
2010-08-29 22:40:23 +06:00
QAston
d81f5facc0 *Allow SPELL_EFFECT_POWER_BURN(64) to proc with damage.
--HG--
branch : trunk
2010-08-29 05:26:32 +02:00
QAston
2d877bbbfd *Allow damage shield hits to miss.
*Send overkill on damage shield hit.
*Correct data order for execute log of power take effects.

--HG--
branch : trunk
2010-08-29 03:38:21 +02:00
QAston
511e8c5acf *Make EffectHealMechanical, EffectHealPct, EffectHealMaxHealth and EffectHealthLeech to use proc system for their dmg/heal (thanks kiper for research)
*Fix some spells with EffectHealMaxHealth with effect value set to 0.
*Fix a typo.

--HG--
branch : trunk
2010-08-28 23:01:04 +02:00
azazel
71de9aa79f DB Scripts: Fix calling of DB scripts from spell_scripts table
--HG--
branch : trunk
2010-08-28 21:01:16 +06:00
QAston
e85df47749 *Send SMSG_SPELLINSTAKILLLOG on SPELL_EFFECT_INSTAKILL(1), thanks to Zor for base packet info.
--HG--
branch : trunk
2010-08-28 00:30:07 +02:00
QAston
6c3015a7e6 *Fix issues with negative dmg of periodic power burn and periodic power leech effects added recently.
*Minor cleanup.

--HG--
branch : trunk
2010-08-27 20:51:29 +02:00