Commit Graph

64 Commits

Author SHA1 Message Date
Rat
6bcb297de4 *code cleanup
*totally destroyed m_creature, use "me" for future coding

--HG--
branch : trunk
2010-04-14 23:07:41 +02:00
Spp
49d05ba9aa Code style (game + scripts only):
"( " --> "("
" )" --> ")"

--HG--
branch : trunk
2010-04-07 22:59:46 +02:00
Spp
d19e127080 Code style (game + scripts only):
"if(" --> "if ("

--HG--
branch : trunk
2010-04-07 19:14:10 +02:00
Spp
f490ad5ac2 Code Style: tab to spaces
--HG--
branch : trunk
2010-04-07 17:24:07 +02:00
Spp
8034a6c48e Rename 'Hostil' to 'Hostile'
Credits to NoFantasy (Mangos)
Closes issue #411

--HG--
branch : trunk
2010-03-09 11:11:10 +01:00
raczman
91b8ee104e Added new type-safe cast functions.
This, when properly used, should get rid of most memory corruption issues,
currently, casting types C-style with no checks leads to some abstract crashing.
Functionality is same as with dynamic_cast<>, but with no RTTI check - so when
casting into invalid type you will receive NULL, and most probably crash.
At the same time, i took the liberty to convert most Player* casts to ToPlayer().
Still needs crapload of casts being moved to new facility.

--HG--
branch : trunk
2010-03-07 15:20:19 +01:00
n0n4m3
982296518c Fixed crash in PetAI::UpdateAI.
--HG--
branch : trunk
2010-02-06 19:06:55 +03:00
QAston
6e76e67253 *Fix petAi::Update crash.
--HG--
branch : trunk
2010-01-19 22:15:04 +01:00
n0n4m3
99f66a6bc9 Updated copyright for new year.
--HG--
branch : trunk
2010-01-16 20:19:18 +03:00
n0n4m3
706718b28c Fixed some problems with pets, port from tc1, by krz, thx Frankir.
--HG--
branch : trunk
2010-01-16 19:11:32 +03:00
n0n4m3
5a3b3d83ee Fixed some typos and revert one commit
--HG--
branch : trunk
2009-12-19 19:46:07 +01:00
n0n4m3
ef2cbee517 Avoid not needed too oftent send update data, cleanups. by SilverIce
--HG--
branch : trunk
2009-12-19 17:58:45 +01: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
Machiavelli
afba628188 *PetAI update;
Pets now start attacking their owners target in defensive mode as soon as the hunter does (3.0.2 change)
Correctly chase target if attack command was given after pet has set gaze on target from defensive mode with chase = false

--HG--
branch : trunk
2009-10-09 21:34:23 +02:00
maximius
b3f3a82e5f *Fix Unit::m_regenTimer so creatures regen health properly, by MrSmite
*Partial Utgarde Pinnacle instance & boss scripts, rewritten by Tartalo, original by ckegg
*Fix a bug where pets would engage new attackers while approaching the target their owner sent them to attack, by MrSmite

--HG--
branch : trunk
2009-09-22 16:14:37 -07:00
maximius
18c9a4f510 *Indentation cleanup
--HG--
branch : trunk
2009-09-18 14:14:39 -07:00
maximius
0174dd5aff *Fix pets not selecting next target bug, by MrSmite
--HG--
branch : trunk
2009-09-15 13:43:09 -07:00
maximius
7349c1d9dd Backed out changeset 60578c781be1
--HG--
branch : trunk
2009-09-14 16:48:00 -07:00
maximius
4ab8d4a5dd *Use 4 spaces instead of tabs in .cpp and .h files
--HG--
branch : trunk
2009-09-14 16:06:21 -07:00
maximius
9c28c82a66 *Attempt to fix PetAI crash, thanks WarHead
--HG--
branch : trunk
2009-09-11 16:44:59 -07: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
megamage
9bc5334c00 [8297] Partly revert "[8291] Now allow auto-casting pet spells out of combat by PetAI, related code cleanups." Author: VladimirMangos
Use less stricted limitations for pet out-of-combat autoucasts.

--HG--
branch : trunk
2009-08-05 15:48:04 -05:00
megamage
84694a1f92 [8291] Now allow auto-casting pet spells out of combat by PetAI, related code cleanups. Author: VladimirMangos
--HG--
branch : trunk
2009-08-02 10:17:07 +08: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
09b386a786 [7886] Drop use table petcreateinfo_spell
This is first commit in chain for remove oudated and not used pet functionality.

    * Use instead dropped table CreatureSpellData.dbc if creature_template.PetSpellDataId set (mostly hunter pets)
    * Use creature_template.spellN if not set creature_template.PetSpellDataId (mostly different summon creatures)
    * Fixed bug with not removing from action bar spell icon for not ranked unlearned spells.

    Note: summoned controllable creatures without PetSpellDataId must have expected spells in spellN feilds for creature_template.

[7887] Drop pet spell teaching code, including field in character_pet.

Author: VladimirMangos

--HG--
branch : trunk
2009-05-24 12:16:12 -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
de11b9e901 [7730] Some optimizantion and code style. Author: zhenya
--HG--
branch : trunk
2009-04-29 00:26:07 -05:00
megamage
3a65800218 [7667] Add to CreatureAI field pointing to creature itself. Use it instead diff. fields in subclases. Author: VladimirMangos
Also send pointer to AI constructors ans mark constructors as explicit.

    This changes allow move now some generic often used AI code to CreatureAI helper functions.

--HG--
branch : trunk
2009-04-14 19:54:49 -05:00
megamage
bc2f2bc56a [7552] Move client version dependend DBC code to src/game. Author: VladimirMangos
--HG--
branch : trunk
2009-03-27 09:58:20 -06:00
megamage
d944be8381 *Fix a crash for creatures using petAI without charminfo.
--HG--
branch : trunk
2009-03-20 09:39:25 -06:00
megamage
d6e878caf2 *Merge.
--HG--
branch : trunk
2009-03-14 19:43:31 -06:00
megamage
bd79f8cb8b *Fix broken pet autocast.
--HG--
branch : trunk
2009-03-14 19:42:00 -06:00
megamage
a5882ee84a *Merge.
*"Fix Glowing Blood" is not merged. Outdated patch?

--HG--
branch : trunk
2009-03-13 18:48:53 -06:00
megamage
146b2560aa *Call stopmoving in moveidle.
--HG--
branch : trunk
2009-03-13 14:42:57 -06:00
megamage
16ee4a46c2 *Merge.
--HG--
branch : trunk
2009-03-12 14:22:59 -06:00
megamage
1fbfc6da64 *Assign possessed AI and pet AI to charmed creatures.
--HG--
branch : trunk
2009-03-12 14:15:44 -06:00
megamage
7915fd768a *Merge.
--HG--
branch : trunk
2009-03-06 18:09:01 -06:00
megamage
8787c00ca3 *Disable charmed/possessed creature AI.
*Use general react states to replace charminfo react states.

--HG--
branch : trunk
2009-03-05 18:48:56 -06:00
megamage
b1677c901d [7362] Use IN_MILISECONDS where appropriate, other cleanups. Author: VladimirMangos
--HG--
branch : trunk
2009-03-02 16:53:50 -06:00
megamage
31637d4aac *Merge.
--HG--
branch : trunk
2009-02-18 11:36:19 -06:00
KingPin
14234c86fa Newline added to bottom of all files.
--HG--
branch : trunk
2009-02-17 20:07:49 -06:00
megamage
8fee06f041 *AI structure update.
--HG--
branch : trunk
2009-01-30 18:10:05 -06:00
megamage
03234a0657 *Fix some bugged AI which cause creatures enter evade mode repeatedly.
*Let player enter combat when attacked but not hit by creatures.

--HG--
branch : trunk
2009-01-30 01:14:48 -06:00
megamage
30c5bff102 *Fix critter AI.
*Some AI structure change.

--HG--
branch : trunk
2009-01-28 20:16:11 -06:00
Drahy
5dab980495 * Updated copyright notice for new year (2009) part 2
* Changed mangos website

--HG--
branch : trunk
2009-02-04 12:42:26 +01:00
Drahy
7c19c420c6 * Updated copyright notice for new year (2009) part 1 - Mercurial cant convert all files at once
--HG--
branch : trunk
2009-02-04 12:04:12 +01:00
megamage
d20eaef1d6 *Merge.
--HG--
branch : trunk
2009-01-31 13:58:33 -06:00