aboutsummaryrefslogtreecommitdiff
path: root/src/game/CreatureAI.cpp
AgeCommit message (Collapse)Author
2010-04-25Refactor Creature::SelectNearestTarget(float dist)Trazom62
This function is used in many scripts to find the nearest enemy within the given distance. However, it had an implicit limit to the ATTACK_DISTANCE. so in many case the "dist" was in fact just ignored. In other case, the ATTACK_DISTANCE is required. So 2 functions are necessary to avoid ambiguities. The refactoring is the split of the function in 2: SelectNearestTarget and SelectNearestTargetInAttackDistance. --HG-- branch : trunk
2010-04-19Remove LOTS of compile warningsSpp
--HG-- branch : trunk
2010-04-14*code cleanupRat
*totally destroyed m_creature, use "me" for future coding --HG-- branch : trunk
2010-04-07Code style (game + scripts only):Spp
"( " --> "(" " )" --> ")" --HG-- branch : trunk
2010-04-07Code style (game + scripts only):Spp
"if(" --> "if (" --HG-- branch : trunk
2010-04-07Code Style: Remove trailing spacesSpp
--HG-- branch : trunk
2010-03-27Make a function(ToTempSummon()) which can convert Creature to TempSummon ↵Anubisss
with a C++ cast(reinterpret_cast) and with a type check(isSummon()). This function is like ToPlayer(), ToTotem(), etc. This commit is like ede831bdd6f0cff481acc33f269fa7f8c78befd4 / r7496: http://code.google.com/p/trinitycore/source/detail?r=ede831bdd6f0cff481acc33f269fa7f8c78befd4 As a result, this commit has the advantages and the "disadvantages" too, like r7496. Please try to be polite if this commit causes some crashes. --HG-- branch : trunk
2010-03-07Some Creature* casts moved to new ToCreature.raczman
Added const Creature* ToCreature() --HG-- branch : trunk
2010-03-06prevent stack overflow caused by MoveInLineOfSight callssilver1ce
should close #995 issue --HG-- branch : trunk
2010-02-05A great purge of obsolete macros.Xanadu
--HG-- branch : trunk
2010-01-16Updated copyright for new year.n0n4m3
--HG-- branch : trunk
2009-12-17Fixed typon0n4m3
--HG-- branch : trunk
2009-10-17*Massive cleanup redux.maximius
--HG-- branch : trunk
2009-10-17*Backed out changeset 3be01fb200a5maximius
--HG-- branch : trunk
2009-10-17*Massive cleanup (\n\n -> \n, *\n -> \n, cleanup for(...) to for (...), and ↵maximius
some other cleanups by hand) *Fix a possible crash in Spell::DoAllEffectOnTarget --HG-- branch : trunk
2009-10-09* Fix exploit with non-combat pets, realy make them not fight, requires DB ↵Biglad
support set to type=12 --HG-- branch : trunk
2009-10-06*Utgarde Pinnacle: Svala fixes - Fix some crashes, complete ritual code and ↵maximius
change defines by enums, by Tartalo *Fix Acherus Flightmaster for Alliance, by MrSmite *Fix The Party's Over achievement (Prince Taldaram) & Implement Good Grief achievement (Maiden of Grief), by Tartalo *Fix certaint things entering the threat list and never leaving, bugging mob's HP regeneration (ie: Priest's Lightwell).. again. Thanks Gyullo. --HG-- branch : trunk
2009-09-27*Revert 5675/43c0c883c44d back to 4821/9d0967884f0b way (seems to work ↵maximius
properly now), thanks Gyullo --HG-- branch : trunk
2009-09-15*Disable commit 4821 / 9d0967884f0b (caused some NPCs to not regenerate HP ↵maximius
when they should), found by Gyullo and tested by Manuel --HG-- branch : trunk
2009-08-31*Use updatecombatstate to replace updatevictim. This should fix the bug of ↵megamage
MoveSeekAssistance is replace by MoveChase immediately. Thanks to totoro --HG-- branch : trunk
2009-08-28*Update flame levi script. Allow player to shoot down pyrite container and ↵megamage
refill the demolishers. *Other script-related fixes. --HG-- branch : trunk
2009-08-27*Fix the behavior of mob assistance.megamage
--HG-- branch : trunk
2009-08-24*Fix the bug that sometimes assisting mobs just chase the attacker without ↵megamage
attacking. --HG-- branch : trunk
2009-08-23*Update vehicle system. Make vehicle a seperate class from creature.megamage
--HG-- branch : trunk
2009-08-22*Let all accessories enterevademode when vehicle enter evade mode.megamage
--HG-- branch : trunk
2009-08-20*Try to fix the bug of mobs' chain aggro.megamage
--HG-- branch : trunk
2009-08-08*Some update of vehicle.megamage
--HG-- branch : trunk
2009-08-08*Also aggro player-controlled units in dozoneincombat.megamage
--HG-- branch : trunk
2009-07-22*Implement Aura Type 247 (SPELL_AURA_CLONE_CASTER) and 279 ↵QAston
(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-13*Fix a bug that creatures with owner chase their enemies after death.QAston
*fix a typo breaking procflags on aura remove - shattered barrier and master of subtlety work again --HG-- branch : trunk
2009-06-11* Change name of recently added scriptAI functions to better reflect purposeMachiavelli
* Fix typo in 3910_world.sql, spotted by irish --HG-- branch : trunk
2009-06-09*Fix a bug that creature ignore LOS in assistance case.megamage
--HG-- branch : trunk
2009-06-05*Still use the old updatevictim functions for most scripts because some old ↵megamage
scripts may cause crash using new function. --HG-- branch : trunk
2009-05-27*Merge SD2.Anubisss
*r983: Add additional checks for zoneInCombat-function. *r984: Remove two useless functions, cleanup some code. - The most part of the patch skipped. *r985: Clean up some code and prevent Spark from doing certain actions if in certain areas *r986: Remove most EventAI code - Skip this patch *r987: Correct and remove now obsolete documentation. - Skip: delete EventAI.txt --HG-- branch : trunk
2009-05-21*Check reactstate in UpdateVictim.megamage
--HG-- branch : trunk
2009-05-20*Update Naxx scripts. Now only Kelthuzad is incompletedmegamage
--HG-- branch : trunk
2009-05-17*Update script for Loatheb.megamage
--HG-- branch : trunk
2009-05-16*Update gluth script.megamage
--HG-- branch : trunk
2009-05-16*Update some instance script functions.megamage
--HG-- branch : trunk
2009-05-15*Merge.megamage
--HG-- branch : trunk
2009-05-13*Update some script functions.megamage
--HG-- branch : trunk
2009-05-13* avoid loot/exp when the mobs are killed by npc. Authore: KAPATEJIb @ ↵Muhaha
getmangos.org --HG-- branch : trunk
2009-05-12*Move MoveFollow owner from MoveTargetedHome to enterevademode.megamage
--HG-- branch : trunk
2009-05-11*Update creature AI functions.megamage
--HG-- branch : trunk
2009-05-10*Update AI scripts. Use better default AI.megamage
--HG-- branch : trunk
2009-05-10*Fix build.megamage
--HG-- branch : trunk
2009-05-10*Move some AI functions to core. No real change.megamage
--HG-- branch : trunk
2009-05-10*Rename some script functions (no real change).megamage
--HG-- branch : trunk
2009-05-09*Fix some typos of script functions.megamage
--HG-- branch : trunk
2009-05-06*Update creature AI functionsmegamage
--HG-- branch : trunk