Commit Graph

185 Commits

Author SHA1 Message Date
Anubisss 6cbe65eaa3 Fix a mem leak.
--HG--
branch : trunk
2010-01-10 11:20:52 +01:00
QAston 8e9d2cdf01 Update aura system:
* Change system logic - unify Auras, AreaAuras and PersistentAreaAuras:
  * Aura has now its owner - which is the WorldObject, which applies aura (creates AuraApplication object) dependant on aura radius, and effect type
  * Owner can be Dynobj (DynObjAura class) for PersistentAreaAuras, or Unit (UnitAura class) for Area and nonArea auras
  * Aura data is shared for all units which have AuraApplication of the Aura
   * Because of that AuraEffect handlers , and periodic tick functions can't modify AuraEffect object (they are const now)
  * Remove spell source and AreaAuraEffect classes
  * Add AuraEffect::UpdatePeriodic function, to allow periodic aura object modification (target independant)
  * Add AuraEffect::CalculateAmount and AuraEffect::CalculateSpellMod function, to allow non-default amount calculation
  * AreaAura updates are done in owner _UpdateSpells cycle
  * Since now you don't need to wait an aura update cycle to get area aura applied on it's correct target list
  * And you can access area aura target list
  * Add basic support for aura amount recalculation
  * Save recalculation state and base amount of auras to db
  * Add AuraEffect::CalculatePeriodic function to determine if aura is periodic, and to set correct tick number after aura is loaded from db
  * Add ChangeAmount function in addition to SetAmount function, to allow easy reapplication of AuraEffect handlers on all targets
  * Sort aura effect handlers in SpellAuras.cpp and .h by their use
  * Add check for already existing aura of that type to some AuraEffect handlers, to prevent incorrect effect removal
  * SPELL_AURA_CONVERT_RUNE and MOD_POWER_REGEN and MOD_REGEN hacky handlers are now implemented correctly
  * Send aura application client update only once per unit update - prevent unnecesary packet spam
 * Fix ByteBuffer::appendPackGUID function - it added additionall 0s at the end of the packet
 * Fix memory leak at player creation (not deleted auras)
 * Updated some naming conventions (too many to mention)
 * Added Unit::GetAuraOfRankedSpell() function
 * Remove procflags on aura remove, use Aura::HandleAuraSpecificMods instead
 * Added functions to maintain owned auras (GetOwnedAuras, GetOwnedAura, RemoveOwnedAura, etc)
 * Implement AURA_INTERRUPT_FLAG_LANDING
 * Implement EffectPlayerNotification (thanks to Spp)
 * Remove wrong aura 304 handler
 * Add better handler for death runes
 * Remove unnecesary variables from DynamicObject class, and cleanup related code, link dynobj duration with aura
 * Add GetAuraEffectTriggerTarget function in CreatureAi for special target selection for periodic trigger auras used in a script
 * Add many assert() procection from idiots using some functions in wrong way
 * I am to lazy to write here anything more
Thanks to Visagalis for testing this patch
PS: Do not make patches like this, please

--HG--
branch : trunk
2010-01-10 01:23:15 +01:00
p0wer 327e371e48 Fix unknown error message for summoned fire elemental and risen ghoul.
--HG--
branch : trunk
2010-01-01 19:37:52 -06:00
n0n4m3 3344b3500a Fixed Glyph of Feral Spirit
--HG--
branch : trunk
2009-12-26 10:24:19 +01:00
n0n4m3 250a00cc1c Temporary revert 6743 commit. I fix this patch across 1-2 days.
--HG--
branch : trunk
2009-12-24 10:20:15 +01:00
n0n4m3 3fe0bc5254 Replaced time(NULL) on sGameTime.GetGameTime() this is used for better performance.
Original Timer.h divided into 2 parts. Shared project has no need to know about GameTime Singleton.
2 Identical structures with different types are now replaced with one generic templated structure and 2 typedefs.

--HG--
branch : trunk
2009-12-23 08:04:10 +01:00
n0n4m3 1c0f2d233f Fix problem with max pet distance from owner. by VladimirMangos
--HG--
branch : trunk
2009-12-19 20:02:38 +01:00
n0n4m3 fa86c69c49 [8987] Allow swap spell and command/reaction in pet action bar.
--HG--
branch : trunk
2009-12-17 18:21:06 +01:00
n0n4m3 eef7a6a1cc Corrected gargoyle damage calculation
--HG--
branch : trunk
2009-12-17 09:10:04 +01:00
n0n4m3 3b9a93bfc4 Fixed Mirror Image DisplayId from owner, by Alexsot
--HG--
branch : trunk
2009-12-17 06:52:42 +01:00
maximius 654519d1a6 *Some cleanup (mostly whitespace changes)
--HG--
branch : trunk
2009-11-20 19:11:28 -08:00
maximius 27d3bf466c *Convert some tabs to 4 spaces.
--HG--
branch : trunk
2009-11-17 20:26:35 -08:00
maximius c3ba7d2208 *Fix getLevel() being parsed as a char in ostringstream use
--HG--
branch : trunk
2009-11-01 20:50:31 -08:00
maximius b257a28fa9 *Cleanup, fix many cases of unoptimized loops, potential crashes, excessively large data types, unnecessary or wrong casts, non-standardized function calls, and so on..
*Proper Maexxna Web Spray locations (old locations sent players flying into the air)

--HG--
branch : trunk
2009-11-01 17:53:07 -08:00
maximius a22da32a51 *Correctly update negative aura duration at loading, thanks Sisif
--HG--
branch : trunk
2009-10-31 16:44:14 -07:00
Kudlaty 98d53f6a9d Fix Feeding Frenzy, Cobra Reflexes, Cornered. Now they are active only when victim hp is below certain percentage. Patch by thenecromancer, updated by krz
--HG--
branch : trunk
2009-10-31 01:50:52 +01:00
maximius d22768a6b5 *Cleanup
--HG--
branch : trunk
2009-10-18 18:38:46 -07:00
maximius 3f338cc1c3 *Massive cleanup redux.
--HG--
branch : trunk
2009-10-17 16:20:24 -07:00
maximius e585187b24 *Backed out changeset 3be01fb200a5
--HG--
branch : trunk
2009-10-17 15:51:44 -07:00
maximius 26b5e033ff *Massive cleanup (\n\n -> \n, *\n -> \n, cleanup for(...) to for (...), and some other cleanups by hand)
*Fix a possible crash in Spell::DoAllEffectOnTarget

--HG--
branch : trunk
2009-10-17 15:35:07 -07:00
Muhaha f162303eae * Implement Spell 6962 by Muhaha & Nevan , based on http://bitbucket.org/panaut0lordv/tc2-patches/src/tip/bgpetressurect
--HG--
branch : trunk
2009-10-06 22:41:37 +02:00
maximius bcf19139af *Cleanup comments, update THANKS (no idea if I missed anybody o_O), added Themris' Warlock's Death Coil healing and damage fix, corrected some typos
--HG--
branch : trunk
2009-09-10 22:15:29 -07:00
maximius 5633ea57d1 *MrSmite's PetAI patch, plus Hawthorne's Instant Flight Paths (now with actual code! >_<)
--HG--
branch : trunk
2009-09-10 09:59:16 -07:00
maximius 465d3c6717 *Fix Hunter pet focus regen (thanks MrSmite)
--HG--
branch : trunk
2009-09-10 08:48:25 -07:00
maximius 790a04bb29 *Replace uint32 with int32, should fix "Pet::Update(): pets aren't regenerating focus even though m_regenTimer is less than diff"..
--HG--
branch : trunk
2009-09-09 23:39:15 -07:00
megamage 21af4cf832 *Some clean up and add debug info to find the reason of crash.
--HG--
branch : trunk
2009-08-26 19:28:21 -05:00
megamage 87270fefc2 *Some update of aura system. Remove unnecessary variables and parameters from auraeffect. Always refer to parent aura when finding target/source/caster.
--HG--
branch : trunk
2009-08-24 22:31:54 -05:00
megamage 675cac9a6b *Remove log spams when ghoul is summoned.
--HG--
branch : trunk
2009-08-24 12:05:50 -05:00
megamage bcc23fac92 *Fix a bug that dk's ghoul generates energy twice per tick.
--HG--
branch : trunk
2009-08-24 11:35:01 -05:00
megamage 5f1589d6d1 *Allow vehicles to regenerate energy.
--HG--
branch : trunk
2009-08-23 22:36:51 -05:00
megamage 7712d5e0bd *Let ghoul regenerate 20 energy per 2 seconds instead of 4 seconds (I think it should be the same as rogue)
--HG--
branch : trunk
2009-08-23 22:20:34 -05:00
megamage 1ee90e1022 *Update vehicle system. Make vehicle a seperate class from creature.
--HG--
branch : trunk
2009-08-23 22:09:43 -05:00
QAston a60600b717 *Script for Ebon gargoyle - original patch by thenecromancer.
--HG--
branch : trunk
2009-08-14 15:30:47 +02:00
megamage 978242da3f *Try to fix a crash caused by single target auras. Thanks to QAston.
--HG--
branch : trunk
2009-08-11 18:26:04 -05:00
megamage 9403ff03e7 *Only use m_isWorldObject to check if an object is in grid or world.
--HG--
branch : trunk
2009-08-11 16:14:45 -05:00
QAston 1d96091d2a *Improvements in map managing.
--HG--
branch : trunk
2009-08-01 00:20:32 +02:00
QAston 1f53433c6c Backed out changeset "[8251] Store in some DB tables only data for first rank. Author: VladimirMangos" until support for different values for ranks and for custom ranks is added.
--HG--
branch : trunk
2009-07-31 13:21:01 +02:00
megamage 2bddcc4303 [8251] Store in some DB tables only data for first rank. Author: VladimirMangos
* Allow add to DB data only for first rank in table `mangos_spell_bonus_data` and `mangos_spell_proc_event`.
    * Copy data for other ranks for speedup use at loading for this data and data from `spell_proc_item_enchant`.

--HG--
branch : trunk
2009-07-31 10:21:57 +08:00
megamage bf8c0933c9 [8221] Removed trailing whitespaces
With excluded dep/ - as usual.

    Signed-off-by: freghar <compmancz@gmail.com>

--HG--
branch : trunk
2009-07-30 10:19:03 +08:00
QAston c15c25aca4 *Cleanups and Fixes in Mirror Image script.
--HG--
branch : trunk
2009-07-28 21:34:18 +02:00
QAston 70e6446118 *Add SUMMON_MASK_CONTROLABLE_GUARDIAN to regular pets.
--HG--
branch : trunk
2009-07-22 19:11:16 +02:00
QAston 2ff21d4cef *Implement Aura Type 247 (SPELL_AURA_CLONE_CASTER) and 279 (SPELL_AURA_INITIALIZE_IMAGES)
*Handle CMSG_GET_MIRRORIMAGE_DATA opcode.
*Save Minions follow angle to allow themmoving in a formation
*Improvements in SpellAI: correctly evade and select attack target for creatures without threat list
*Use SpellAI instead of PetAI for not controllable guardians
*Only guardians with SUMMON_TYPE_PET are controllable now
*Add script and template data for Mirror Image.
*Thanks to Drahy for help.

--HG--
branch : trunk
2009-07-22 17:10:30 +02:00
megamage 208087ff6e [8182] Store and use Map* pointer in WorldObject instead map ids for speedup Author: Ambal
Also some code logic cleanups.
    Changes let make more cleanups in base map access and other places,
    but this chnages not inlcuded in patch.

*This patch may cause crash.

--HG--
branch : trunk
2009-07-16 11:49:00 +08:00
megamage e1d93bd00f *Backup your DB!
[8098] Support uint32 spell ids in code. Author: VladimirMangos

    * Propertly work with uint32 spell ids in player action bar
    * Fix in same time bug with not save equipment set button with id==0
    * Merge misc field in character_action and playercreateinfo_action to action field as 3 byte
    * Propertly load uint32 spell ids from character_spell
    * Fixed types for some pet/creature related structure for spell id storing.

--HG--
branch : trunk
2009-07-01 18:07:20 -05:00
megamage fe89fbfbdb [8057] Move code from Event AI to class Creature function for reuse in other scripting cases. Author: NoFantasy
--HG--
branch : trunk
2009-06-27 15:37:33 -05:00
Machiavelli 6a6add72f5 * Fix some typo's in LoadPetFromDB SQL, spotted by Drahy
--HG--
branch : trunk
2009-06-23 18:50:33 +02:00
QAston ad91c6b1e2 [8052] Fixed typo in error log output. Author: The_Game_Master
[8049] Added energize effect after last heal tick for 33763 and ranks. Author: bobaz
[8053] At character talents reset using chat command also reset talents
for all character pets. Author: VladimirMangos

--HG--
branch : trunk
2009-06-23 13:05:15 +02:00
Machiavelli a4dafbf8ec * More updating of iterator data types in loops
--HG--
branch : trunk
2009-06-18 18:29:28 +02:00
Machiavelli 3a309abfab * In case of a 'for' loop, don't declare the iterator of a type that has a larger value range when the iterator can take a maximum value of a more efficient data type. (int to uint8 in most cases).
* Other minor cleanups, Null pointer checks etc.

--HG--
branch : trunk
2009-06-18 17:21:25 +02:00
QAston 30d0b2ed5f *Fix raise dead spell - original patch by Astellar, thanks for some help in conversion for Azrael
*Correctly apply spell cooldown for spells with cooldown starting after pet unsummon.

--HG--
branch : trunk
2009-06-18 14:17:11 +02:00