Commit Graph
231 Commits
Author SHA1 Message Date
Kinzcool c536305e3a Core: Droped faction_H field -- only one faction table is necessary 2014-04-27 18:13:55 -04:00
jackpoz 8ca6371793 Core/Misc: Ensure GetVictim() returns a valid reference when expected
Add a new method EnsureVictim() which asserts a valid not NULL reference will be returned to the caller. Use this whenever the GetVictim() would be dereferenced .
2014-04-19 21:48:22 +02:00
joschiwald a60ba240b7 Core/Entities: add some log messages in CheckCreatureTemplate
* Happy Error Spam
2014-01-06 20:30:11 +01:00
joschiwald cd76d32907 Core/Entities: correct creature damage, offhand damage should work too
* todo: some creatures need dmg_multiplier update in creature_template
2014-01-04 18:22:06 +01:00
Vincent_Michael 20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
Malcrom 3018ff4e6c Core/Creature: Obtain Attack power and base damage from creature_classlevelstats table. 2013-12-31 12:45:56 -03:30
Shauren 1cdc2e8c2a Core/Movement: Fixed creature movement on transports 2013-12-31 14:12:02 +01:00
jackpoz e90a7f82d4 Core/AI: Fix CreatureAI left uninitialized
Fix CreatureAI left uninitialized for 1 server tick for Creatures with DeathState:DEAD . This is a workaround required after c9cf2f059f changes .

Valgrind log:
 Conditional jump or move depends on uninitialised value(s)
  at : npc_draenei_survivor::npc_draenei_survivorAI::MoveInLineOfSight(Unit*) (zone_azuremyst_isle.cpp:104)
  by : CreatureAI::MoveInLineOfSight_Safe(Unit*) (CreatureAI.cpp:123)
  by : CreatureUnitRelocationWorker(Creature*, Unit*) (GridNotifiers.cpp:134)
  by : Trinity::AIRelocationNotifier::Visit(GridRefManager<Creature>&) (GridNotifiers.cpp:252)
 Uninitialised value was created by a heap allocation
  at : operator new(unsigned long) (vg_replace_malloc.c:319)
  by : npc_draenei_survivor::GetAI(Creature*) const (zone_azuremyst_isle.cpp:66)
  by : ScriptMgr::GetCreatureAI(Creature*) (ScriptMgr.cpp:792)
  by : FactorySelector::selectAI(Creature*) (CreatureAISelector.cpp:41)
  by : Creature::AIM_Initialize(CreatureAI*) (Creature.cpp:716)
  by : Creature::AddToWorld() (Creature.cpp:190)
2013-12-15 21:14:47 +01:00
jackpoz 1c0903e286 Core/Misc: Fix some static analysis issues
Fix some static analysis issues about uninitialized values. Most of them are false positives, always initialized before being accessed, while some of them are real issues spotted by valgrind too.
2013-12-14 18:41:26 +01:00
Shauren 54fd53f7e3 Core/Movement: Fixed possible invalid memory access 2013-12-12 09:50:52 +01:00
trickerer 91ebea4a77 Don't allow units to enter combat upon death 2013-12-11 09:38:24 +07:00
Spp 94e2b9332a Core/Logging: Remove LOG_FILTER_XXX defines with it's value (remember logger names are case-sensitive) 2013-11-08 10:50:51 +01:00
Shauren b81bf7d025 Core/Spells: Implemented additional conditions for spells that start cooldown after an event instead of after cast 2013-10-26 14:39:00 +02:00
Shauren ce55647c41 Core/Transports
* Rewritten path generation, now uses splines - timers are a lot more accurate now
* Implemented stopping transports
* Implemented spawning transports in instances
* Implemented spawning gameobjects as transport passengers
* Transport passengers are now stored in creature/gameobject table using gameobject_template.data6 from transport's template as map id
2013-10-16 18:37:29 +02:00
Shauren a368fae588 Core/Players: Fixed issues with incorrect targets being selected for spells 2013-10-03 17:07:25 +02:00
Discover- 80ce30ac7d Core/SAI: Add 'playerOnly' parameters to SMART_TARGET_CLOSEST_ENEMY and SMART_TARGET_CLOSEST_FRIENDLY. Wiki is updated accordingly. 2013-09-30 10:11:02 +02:00
Shauren 75cc4e7b25 Core/Auras
* Fixed unsafe removal of charm auras, it is now safe to remove them inside AI hooks
* Fixes crash in SmartAI::EnterEvadeMode

Closes #8679
2013-08-20 00:43:03 +02:00
Vincent-Michael da1e466bd5 Core/Misc: Implemented GetObjectScale function 2013-08-17 23:47:43 +02:00
Vlad 0b9a8ccef5 Core/Misc: Change creatures and gameobject phasemask from 16 to 32 bits
Signed-off-by: Nay <[email protected]>
2013-07-19 04:03:40 +01:00
Shauren 55fa58af19 Core/Movement: Prevent dynamic changes of movement flags for charmed creatures
Closes #10075
Closes #10079
2013-06-22 13:42:13 +02:00
Shauren d9df460694 Core/Movement
* Added wrapper methods for setting various movement flags and sending correct movement opcodes
* Made flying and falling spline flags exclusive with each other
2013-06-18 16:47:12 +02:00
Malcrom ec474a62e5 Core: More Function Renaming. 2013-06-11 21:25:12 -02:30
Malcrom 66978cfc3b Core: Some function renaming. 2013-06-11 19:54:27 -02:30
Malcrom 047608e7de Core/SAI: Add check so npc will not send text to pet. Also updated isPet() to IsPet(). 2013-06-11 18:39:51 -02:30
Shauren 9ec22fffa0 Core/Objects: Object scale will now also affect bounding radius and combat reach fields 2013-06-11 17:28:16 +02:00
Vincent-Michael cd24f8521c Core/Gossip: Revert unlearn and dual spec gossip stuff in c238cae7d0 2013-06-08 20:51:39 +02:00
Shauren 88bbff2236 Core/Creatures
* Refactored setting movement flags into separate method
* Falling creatures are no longer treated as flying for movement flag setting purposes
2013-06-07 16:05:39 +02:00
Malcrom c238cae7d0 Core: Remove some no longer needed gossip code. 2013-06-03 22:33:26 -02:30
Spp 9664c0ab5c Core/Misc: Another batch of fixes for issues found by static analysis 2013-05-30 13:18:29 +02:00
Spp d1677b2db0 Core/Logging: Performance-related tweaks to logging system
All sLog->out* functions (except outCommand atm) are replaced with TC_LOG_* macros.
    Memleak fix
2013-05-13 15:07:36 +02:00
Spp 69e81d46b1 Core/Misc: Define multiple functions const (+ code cleanup here and there) 2013-03-20 14:20:17 +01:00
Spp b4ee55dd05 Core/Misc: Do not use singleton when calling to static function ChooseDisplayId (and remove unused parameter) 2013-03-20 14:20:17 +01:00
Shauren 2c169bcca5 Core/Vehicles
* Fixed crash happening when passenger died on vehicle he was controlling
* Fixed crash happening if vehicle control aura was removed before passenger is fully added to vehicle

Closes #7160
2013-03-13 11:34:58 +01:00
Nefarion 49fd11ab5a First step of comment style refactoring to doxygen-style. 2013-03-08 21:55:37 +01:00
QAston 9fd6b7ee01 Core/Entities: Move complex function implementations from Creature.h to Creature.cpp 2013-03-04 12:41:17 +01:00
Nay 4ea31ce886 Core&SQL: Fix typos (RBAC and equips related) 2013-02-26 23:49:21 +00:00
Shauren 0ef974a9de Core/Creatures: Set hover movement flag if bytes1 have hover flag and creature cannot fly 2013-02-22 01:21:49 +01:00
Nay 65258666e0 Core/NPCs: Fix some equipment issues introduced with 028c72a9f2
Also changed equips defaults to 0 (no equipment) instead of 1.

It seems that some parts of the original commit were reverted locally, my bad.
2013-02-20 01:17:27 +00:00
Nay 028c72a9f2 Core/NPCs: Refactor equipments
- creature_template.equipment_id deleted
- creature_equip_template.entry == creature_template.entry
- id field added to creature_equip_template -> PK(entry, id)
- id field in creature_equip_template starts at 1
- creature.equipment_id references id of creature_equip_template
- creature.equipment_id = 0 means no equipment at all (default 1)
- creature.equipment_id = -1 means pick a random equipment from creature_equip_template
- add equipment info to .npc info command

While table creature_equip_template got bigger in size, this system is easier to mantain and allows creatures to have a random template from a group of equipments
2013-02-18 12:24:18 +00:00
Machiavelli 01fbbf3b93 Core/Vehicles: Refactor some parts of vehicle system
- Fix a few crashes:
Closes #9235
- Simplify and get rid of lots of redundant and silly code
- Optimisations in Unit::ChangeSeat
- More documentation
2013-02-18 00:39:58 +01:00
Shauren 944d7290ad Core/Loot: Minor change to previous commit, thanks Vincent_Michael for reminding me about this method in Map class 2013-02-14 11:41:20 +01:00
Shauren ca280dbe05 Core/Loot: Only 3 items of the same entry can drop on 25 man raid difficulties and 1 everywhere else (non-raid or 10 man) 2013-02-13 20:24:23 +01:00
Aokromes 134785f7f1 Core/Log: Change an error to contain DB table guid instead of low guid
Signed-off-by: Nay <[email protected]>
2013-01-16 01:17:13 +00:00
Vincent_Michael cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Subv 3d3a8107e0 Core/Entities: Account for creatures that are spawned below ground level when adding flying flags. (Triggers, mostly) 2012-12-29 14:23:23 -05:00
therzok 5c8c458d60 *Fixing a typo. 2012-12-29 21:14:12 +02:00
Subv 3ad9dafdb6 Core/Entities: Update movement flags for flying/swimming creatures on Creature::Update 2012-12-29 04:01:55 +01:00
Subv 873aa5f2a7 Core/Movement: Do not set movement flags for creatures based only on their InhabitType, check if they are actually on air/water. newline. Should allow us to fix some problems on ICC and the mmaps branch. 2012-12-27 19:31:34 +01:00
click aa3980c744 Core: Remove tabs, fix whitespace and fix nonPCH properly (5am, too late for this stuff...) 2012-12-17 05:39:04 +01:00
thesensei ed4bf13c44 Core/Creature: Update template - reinitialize spell bar for vehicles
* update template didn't change spell bar for players if on vehicle that updates it's template, initialize spells was needed
	* combined with faction changing, since when update is called player faction is ignored and it should be changed to his (based on sniffs)
	* the idea of this automated check inside fix SAI problems mainly, because there you have nothing to use to reinitialize the bar - closes #5254
2012-12-17 02:54:59 +02:00