Commit Graph
444 Commits
Author SHA1 Message Date
Nay 66ce5a1148 And I forgot to Ctrl+S, yay me. 2012-05-20 16:36:44 +01:00
Nay 7661858ac0 Core/SAI: Few changes to db data validation for actions and event flags 2012-05-20 16:13:52 +01:00
kaelima c3287fee06 Core/SmartAI:
- Improve an error msg in ProcessAction
- Allow dist/angle to be 0.0f and set default if negative when using SMART_ACTION_FOLLOW
- Some minor cleanup in Opcodes.cpp, all smsg's should have Handle_ServerSide
2012-05-19 13:04:58 +02:00
Chaplain 469ba0b0e7 Clean up for 58f63509cd
*restore const methods in spellauraeffects
*fix typo in Unit::CalculateMeleeDamage thx bytewarrior
*minor speed up in SpellInfo::GetMaxTicks() thx Warpten
*deleted duble ';;' thx bytewarrior
*speed up in SpellInfo::GetMaxTicks() thx goes to Vincent-Michael
2012-05-10 20:42:07 +03:00
Subv 50f2be538c Fixed build 2012-04-19 18:43:41 -05:00
Subv a5aba350a0 Core/SmartAI: Allow SMART_ACTION_SUMMON_GO and SMART_ACTION_SUMMON_CREATURE to use x, y, z and o parameters as relative offsets for a summoning position (example, summon creature 20 yards in front of the invoker)
Signed-off-by: Subv <[email protected]>
2012-04-19 18:33:25 -05:00
Shauren 4818c70dcb Core/Spells: Removed unneeded phase check from spell casts, its already done in canSeeOrDetect for spells that need it. Probably more phase checks are not needed either 2012-04-18 22:27:40 +02:00
Shauren a483eb5f11 Core/Scripts: Added possibility to remove phase setting from EventMap and an empty-checking method 2012-04-18 12:45:58 +02:00
Shauren 4f14693ef2 Core/Scripts: Corrected previous commit and added a few AI hooks to GameObjectAI 2012-04-14 18:26:16 +02:00
Shauren a3bdaf7e6d Core/Scripts: Added support for creating custom GameObjectAI classes, similar to how creature scripts work. 2012-04-14 17:49:51 +02:00
kaelima 71bf2684be Core/Script: Use DoMeleeAttackIfReady in default ScriptedAI::UpdateAI method (fixes offhand attacks if not UpdateAI is overridden) 2012-04-12 17:53:52 +02:00
faramir118 e3f198ca56 couple wrong return types 2012-04-11 19:58:12 +02:00
kaelima 4c961ff393 Core/Scripts: Remove some unnecessary creature/player casts in scripts and do some safer casting in a silithus script 2012-04-09 14:28:46 +02:00
kaelima 49e24e2dfb Core/Cleanup:
Mostly if(.. -> if (.. and for(.. -> for (..
but also some miscellaneous cleanup
2012-04-08 23:59:52 +02:00
Machiavelli bc96df1aae Core/Shared: Move container functions to shared project under Trinity::Container namespace. Also implement RandomResizeList which takes a predicate function as parameter.
Core/ScriptedAI: Extend SummonList::DoAction to take a predicate function as parameter and allow specifying a maximum number of units to be selected.
2012-04-08 17:40:05 +02:00
MrSmite b843688fa8 PeAI update
* Better handle target selection for defensive pets. Adds triggers for when owner is damaged or begins attacking something.

* Defensive pets no longer run off as soon as a mob aggros the owner but rather at first damage to owner or owner first attack

* Pets on stay will continue to attack unless target unreachable
2012-04-06 12:26:45 -04:00
Shauren b5dc7bc45b Core/SmartScript: Fixed crashes with stored target lists
Closes #5786
2012-04-05 22:13:20 +02:00
Subv 6759bcab16 Core/SAI: Added a new event flag to allow events to NOT reset when the creature evades (SMART_EVENT_FLAG_DONT_RESET)
Closes #5568

Signed-off-by: Subv <[email protected]>
2012-04-05 12:10:56 -05:00
Gyx a1c4786ba0 Core/Script: Code style and some rewriting.
MoveInLineOfSight(Unit* unit) -> MoveInLineOfSight(Unit* who)

Signed-off-by: Gyx <[email protected]>
2012-04-01 19:56:41 +08:00
Nay 92d3548f0b Core/DBLayer: Even more types fixes... 2012-03-29 15:08:17 +01:00
Gyx 360014856d Core/Game: Code style.
Signed-off-by: Gyx <[email protected]>
2012-03-29 13:42:04 +08:00
Shocker a08cb234c0 Merge pull request #5918 from GyxTom/master
Core/Misc: Various cleanups
2012-03-28 18:00:42 -07:00
click cf29214364 Core/AI: Fix some wannabe-invinceable typos here and there... 2012-03-29 00:47:56 +02:00
kandera d94608777c Core/Scripts: Fix invincibility hp level for smart scripts. 2012-03-28 19:21:40 -03:00
Gyx 1544b208da Core/Game: Code style again.
Signed-off-by: Gyx <[email protected]>
2012-03-28 20:00:29 +08:00
Gyx 72cdcbfced Core/Game: Code style.
Signed-off-by: Gyx <[email protected]>
2012-03-28 19:11:50 +08:00
Nay 729f419af1 Core/DBLayer: Correct few more wrong read types (No. 4)
DB/World: Some consistency in the ints "length" field (not really a length)

All world dbs checked
2012-03-27 21:36:16 +01:00
Nay a92820b51c Core/DBLayer: Correct few more wrong read types (No. 1)
DB/World: Some consistency in the ints "length" field (not really a length)

From A to D world tables verified; missing all the others

int(11) -> int32
unsigned int(10) -> uint32
mediumint(8) -> int32
unsigned mediumint(8) -> uint32
smallint(6) -> int16
unsigned smallint(5) -> uint16
tinyint(4) -> int8
unsigned tinyint(3) -> uint8
2012-03-27 00:43:56 +01:00
Shauren e64d1d43dd Core: Add proper cleanup at exit for smart script waypoints and instance encounters 2012-03-24 18:42:35 +01:00
Subv ac4536327f Core/SAI: Allow using SMART_TARGET_ACTION_INVOKER with SMART_ACTION_MOVE_TO_POS
Signed-off-by: Subv <[email protected]>
2012-03-21 19:37:21 -05:00
Shauren 90cacb9ab9 Core/SmartScript: Fixed possible crashes when attempting to use StoreTargetList with a the same list already stored on the same id 2012-03-19 11:43:50 +01:00
Shocker 91314b4cc3 Merge pull request #5743 from MrSmite/PetAI_2
Core/Pets: Fix the Attack button to stop flashing after combat end
2012-03-16 15:01:57 -07:00
MrSmite e0da136c36 Pet UI - Fix for "Attack" continues to flash after combat end
Closes 5551
2012-03-16 16:02:18 -04:00
MrSmite a26e145ae7 Fix for pets moving from stay during combat
Closes #5612
2012-03-16 15:53:07 -04:00
Machiavelli 03a24a84e4 Core/Units:
- Implement UNIT_FIELD_HOVERHEIGHT (requires DB data). This field, sent in update object packet, will determine the height at which a creature hovers if it has movementflag_hover applied. Note that hovering will now update the server-sided z-coordinate by the value of this field, and that all subsequent positional updates to the client will need to send z coordinate MINUS the hover height offset, or the hoverheight will be visually doubled client side.
- Correct our usage of movementflag_flying, movementflag_can_fly, movementflag_hover and movementflag_disable_gravity (previously levitate), and how they relate to InhabitType in the database. This fixes "flying creatures on steroids" bug (wings flapping too fast), and potentially a lot of visual issues in AI scripts. Note that a lot of scripts still set wrong movementflags, these need to be fixed on a case by case basis.
- Send correct packets for SPELL_AURA_FEATHER_FALL, SPELL_AURA_WATER_WALK and SPELL_AURA_HOVER apply/unapply.
- Send correct packet contents for movement update in Unit::SetSpeed.
- Misc. cleanup in affected scripts.
2012-03-12 00:53:45 +01:00
Nay 2b2d054f64 R.I.P SimpleAI
- Convert SimpleAI to (DB) SmartAI
- Spell ids corrected (and completed some of the scripts)
- Random cleanup (code style) in some scripts
2012-03-11 16:59:17 +00:00
Shauren f85fdbebe7 Core/DBC: Remove store getters (useless since we don't have scripts as external dll) 2012-03-10 20:53:26 +01:00
Discover- c4fd6b89db Core/SAI: SMART_ACTION_MOVE_TO_POS will now have param1 as PointId. This means you can now (properly) use SMART_EVENT_MOVEMENTINFORM when reaching the point you make the NPC move to.
Wiki is updated accordingly.
2012-03-03 23:41:29 +01:00
Subv b0985b4d5f Core/Misc: Remove redundant implicit template types in some std::make_pair calls. Should allow the build in Visual Studio 2011 2012-03-02 17:14:14 -05:00
Shauren 254256668b Core: Fixed compile without PCH 2012-03-01 23:45:07 +01:00
Shauren 09f0a2c04f Core/CreatureTextMgr: Added support for creature_text localization 2012-03-01 22:26:05 +01:00
Spp d38bc3a178 Core: Rename GetCreatureInfo to GetCreatureTemplate and minor cleanup here and there 2012-02-27 14:58:47 +01:00
Spp 3e622ee7ac Core: Minor cleanup in ObjectMgr and warning fixes 2012-02-27 11:08:34 +01:00
Shauren dc28b92415 Core: Random cleanup + compile fix 2012-02-23 13:01:16 +01:00
Venugh 5416b734e4 Core/Movement: Use SetLevitate(true/false) instead of AddUnit/RemoveUnit. 2012-02-23 12:32:21 +01:00
Venugh 1cac01b3df Core/Movement: Use SetWalk(true/false) instead of AddUnit/RemoveUnit. 2012-02-23 11:50:58 +01:00
Spp 1e246cb66c Fix build (gcc) and fix warnings 2012-02-22 09:15:57 +01:00
Subv 25d9e2ec29 Core/SAI: Implemented SMARTCAST_AURA_NOT_PRESENT as castflag, the spell will only be casted if the target does not have the aura
Signed-off-by: Subv <[email protected]>
2012-02-18 19:10:18 -05:00
click 5411e1ce52 Core: Clean up whitespace and tabs in the base sourcetree 2012-02-18 16:52:08 +01:00
QAston de706b3211 Core/Db/Conditions: Add new condition targets for:
- CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE ConditionTarget = 1 - check vehicle
- CONDITION_SOURCE_TYPE_VEHICLE_SPELL ConditionTarget = 1 - check vehicle
- CONDITION_SOURCE_TYPE_GOSSIP_MENU = 1 - check gossip provider
- CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION = 1 - check gossip provider
2012-02-15 22:13:27 +01:00