Commit Graph

70 Commits

Author SHA1 Message Date
n0n4m3
720318e856 Implement option to use delay in ForcedDespawn for creature, allow use delayed forced despawn also in EAI, by NoFantasy.
--HG--
branch : trunk
2010-01-16 19:51:59 +03:00
Trazom62
445a603bef Fix ACTION_T_RANDOM_PHASE_RANGE. Thanks Nayre and raczman
--HG--
branch : trunk
2010-01-12 21:16:12 +01:00
QAston
c65aa45bc6 *Tabs to spaces
*Fix a type in CreatureEventAI.cpp from last rev

--HG--
branch : trunk
2010-01-10 02:12:02 +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
_manuel_
dcf4883b51 Implemented new event for EventAI, EVENT_T_RESET.
--HG--
branch : trunk
2010-01-08 14:40:55 -03:00
Rat
6fe36efe0f *apply trinity style to whole source
*comment out all mangos to trinity defines
*this will make merging a little harder, but code will be more clear

--HG--
branch : trunk
2009-12-20 15:20:04 +01:00
n0n4m3
40255a660b Some fixes for GameObject, Chat, Creature, update DuelHandler for 322a
--HG--
branch : trunk
2009-12-17 11:06:50 +01:00
Kudlaty
f04da1b620 Apply #239
EventAI: New Actions:
*ACTION_T_MOVE_RANDOM_POINT: _param1, determines the range that can be the random point.
*ACTION_T_SET_STAND_STATE: _param1, determines the stand state using the enum UnitStandStateType.
*ACTION_T_SET_PHASE_MASK: _param1, determines the phase mask.
*ACTION_T_SET_VISIBILITY: _param1, determines the visibility state using the enum UnitVisibility.
patch by manuel

--HG--
branch : trunk
2009-11-13 16:26:01 +01:00
maximius
389a377dd3 *Destroy quest items on quest failure, and some cleanup.
--HG--
branch : trunk
2009-11-11 15:11:51 -08: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
maximius
6dc187627d *Cleanup.
--HG--
branch : trunk
2009-10-15 14:03:55 -07:00
maximius
f980dd9ac6 *Merge [8524] New cell search algorithm implemented. You can now choose different
visibility distances on continents, in BG/Arenas and instances. Author: Ambal
*Some warning cleanup

--HG--
branch : trunk
2009-09-27 02:24:25 -07:00
maximius
f8a6434fc0 *Replace a ton of switches with RAND(), and overload RAND() to support up to 16 parameters.
*Add a safety check to prevent knocking players off of transports, just in case they die while on one.
*Fix a couple incorrect spell defines.

--HG--
branch : trunk
2009-09-26 02:09:26 -07:00
maximius
333f1c9d72 *[8475] fixed some gcc-warnings Author: balrok
*[8476] Revert some recent cleanup changes, some other fixes and cleanups. Author: VladimirMangos
*[8489] Fixed player visibility update in case view point different from player itself. Author: SilverIce
*[8493] Avoid unexpected multiply error messages at wrong `quest_template`.`RewSpell*` Author: VladimirMangos
*[8496] Resolve some #include cycles and unsafe code.
* Common.h -> Threading.h -> Errors.h -> Common.h
* Remove reduncdent #include "ByteBuffer.h" in headers
* Remove redundent #include "Auth/BigNumber.h" in headers
* Avoid multyply data copy at use some now dropped functions in BigNumber.
* Avoid copy fixed byte count from byte arrays with unknown real size created from BigNumber.
* Avoid possible problems for build mangos at different platform or compilers. Author: VladimirMangos.
*[8501] Apply code style and cleanups to some Player functions. Author: VladimirMangos.
*[8502] Disable quests related to specific game events at startup if event not active. Also rename member boolean variable. Author: NoFantasy
*[8506] Add check for IsAutoComplete() in SendPreparedQuest().
For cases where quest is repeatable but has Method!=0, QuestDetails must be sent instead of RequestItems.
Some additional code cleanup. Author: NoFantasy
*[8507] Check amount of spawned pools before decrement to avoid unexpected result. Also rename variable to more meaningful name. Signed-off-by: NoFantasy <nofantasy@nf.no>

Thanks to Stryker and onkelz28!

--HG--
branch : trunk
2009-09-18 14:10:37 -07:00
maximius
140ec674a0 Backed out changeset d3fe2d6d504a (please test your patches thoroughly before getting me to push them ogeraisi)
--HG--
branch : trunk
2009-09-14 16:49:23 -07:00
maximius
b37f9b1e55 *Merged MaNGOS [8458], [8475], [8476] by ogeraisi, thanks to all authors :)
--HG--
branch : trunk
2009-09-14 16:02:13 -07:00
megamage
2a4c9bcaf9 *Make position as a class;
--HG--
branch : trunk
2009-08-29 14:58:45 -05:00
megamage
04a701246d *Fix build in *nix
--HG--
branch : trunk
2009-08-28 16:38:43 -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
megamage
2d4dac0711 *Try to fix the bug of mobs' chain aggro.
--HG--
branch : trunk
2009-08-20 16:12:23 -05:00
megamage
7f6926dd3b [8235] Fixed typos in ACTION_T_SET_INVINCEABILITY_HP_LEVEL. Author: VladimirMangos
Thanks to Zor for pointing.

--HG--
branch : trunk
2009-07-30 10:56:15 +08:00
megamage
3926cb174b [8233] Implement new EventAI action ACTION_T_SET_INVINCEABILITY_HP_LEVEL. Author: VladimirMangos
Action set min. health value that can be set for creature in result damage apply.
    It can be used in duel like events with creatures to prevent killing creature and other
    cases when creature must avoid damage at some health level while it used.

--HG--
branch : trunk
2009-07-30 10:53:16 +08:00
QAston
4a17224a65 *Creature eventAI cancast power check - by smellbee.
--HG--
branch : trunk
2009-07-23 18:32:32 +02:00
megamage
aff3744e1a [8146] Fixed handling of eventchance for CreatureEventAI. Author: ApoC
Check event chance after timers advances othewise event is
    not scheduled to next time period and event chance is again
    checked on next AI update.

--HG--
branch : trunk
2009-07-12 17:43:22 +08: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
megamage
8adfaceadf *Some cleanup of eventAI.
[8046] Use float for store AttackDistance as expected by using calls. Author: NoFantasy
[8045] Cleanup expression. Author: VladimirMangos

--HG--
branch : trunk
2009-06-19 17:34:24 -05:00
megamage
c4a8da0e32 [8040] Implement Creature::ForcedDespawn and ACTION_T_FORCE_DESPAWN for EventAI. Author: NoFantasy
--HG--
branch : trunk
2009-06-18 17:05:01 -05:00
megamage
208fbe220d [8018] Implement EVENT_T_BUFFED and EVENT_T_TARGET_BUFFED for creature EventAI. Author: VladimirMangos
Its can be used for check specific spell auras stack size for event triggering.
[8017] Always reset creature EventAI phase at creature death.

--HG--
branch : trunk
2009-06-15 23:10:06 -05:00
megamage
572a9191d9 *Some creature display id update. By VladimirMangos and GriffonHeart
--HG--
branch : trunk
2009-06-15 18:02:12 -05:00
megamage
67a356767d [7995] Check display id correctness for creature and gameobjects. Author: VladimirMangos
--HG--
branch : trunk
2009-06-13 09:40:44 -05:00
megamage
853432b201 *Fix a bug that creature ignore LOS in assistance case.
--HG--
branch : trunk
2009-06-09 19:55:15 -05:00
megamage
8bb75918a8 [7951] Mope call for help code to function form Event AI code to allow use it from C++ scripts also. Author: NoFantasy
--HG--
branch : trunk
2009-06-04 16:10:26 -05:00
megamage
067cbec40d [7922] Implement param2 for ACTION_T_COMBAT_MOVEMENT for allow control start/stop melee combat state for creature at start/stop movement in combat. Author: VladimirMangos
--HG--
branch : trunk
2009-05-31 16:24:19 -05:00
megamage
4b3be64c79 [7914] Fixed variable name typos in creature event AI code. Author: NoFantasy
--HG--
branch : trunk
2009-05-31 15:58:16 -05:00
megamage
5ed5513ca8 Mangos [7911]. Author: tomrus88
Very big patch. May cause bugs.

--HG--
branch : trunk
2009-05-31 15:56:51 -05:00
megamage
1288761fb7 [7905] Implement ACTION_T_SET_SHEATH for creature event ai make possibility set ranged fire state. Author: VladimirMangos
Also related cleanup code in field cases and player Player::SetSheath.

--HG--
branch : trunk
2009-05-28 18:43:57 -05:00
megamage
5888134e4d *Fix a bug that owner cannot recall pet when pet is attacking target.
--HG--
branch : trunk
2009-05-22 03:09:24 -05:00
megamage
5fe179019f [7863] Implement for EVENT_T_SPAWNED map/zone/subzone only event conditions. Author: Alex
--HG--
branch : trunk
2009-05-21 10:52:05 -05:00
megamage
67c84b1f3d Mobs fleeing and getting assistance feature implementaion. Author: Neo2003
--HG--
branch : trunk
2009-05-21 10:48:00 -05:00
megamage
b7053ecc0d [7860] Implement creature event ai ACTION_T_CALL_FOR_HELP for explicit call for help in some script cases. Author: VladimirMangos
--HG--
branch : trunk
2009-05-21 10:15:09 -05:00
megamage
1e3591d4e9 [7854] Fixed typo in random text selection code. Author: NoFantasy
--HG--
branch : trunk
2009-05-19 15:42:06 -05:00
megamage
74206e4b6a [7852] Use union of per-event type structures, more checks at creature event ai loading. Author: VladimirMangos
Including:
    * Fixed check for EVENT_T_SPELLHIT school field. Add check at loading. Note: this event expect before and now schol _mask_ in param2.
    * In EVENT_T_RECEIVE_EMOTE use original player condition check code instead copy of related code.

--HG--
branch : trunk
2009-05-19 15:38:36 -05:00
megamage
c3499f39da [7847] Replace paramter unions by uniton of event ai action type structures. Add/fix some loading checks. Author: VladimirMangos
* Also send to process function reference to strucutre instead large amount fields.
    * Specially note that fixed check for first arg of action type 27 that before wrongly test as quest id,
    when by using code expected creature id. Possible some used data wrongly can be quest ids....

--HG--
branch : trunk
2009-05-18 15:14:27 -05:00
megamage
2cdb3865aa [7845] Implement reload support for creature eventAI tables. Author: evilstar
--HG--
branch : trunk
2009-05-18 15:09:34 -05:00
megamage
03cfacb361 *Fix a crash caused by eventai.
--HG--
branch : trunk
2009-05-15 14:23:05 -05:00
megamage
047cc95388 *Add some distance check functions. By VladimirMangos.
--HG--
branch : trunk
2009-05-14 16:50:47 -05:00
megamage
df4e8b456b *Move MoveFollow owner from MoveTargetedHome to enterevademode.
--HG--
branch : trunk
2009-05-12 10:11:54 -05:00
megamage
1d2d3693c4 *Replace some "mangos_debug" with "trinity_debug"
--HG--
branch : trunk
2009-05-04 13:13:07 -05:00
megamage
037015e4e4 *Fix the bug that eventAI creatures change target every update.
--HG--
branch : trunk
2009-05-03 16:58:44 -05:00