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 .
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)
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.
* 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
* Added wrapper methods for setting various movement flags and sending correct movement opcodes
* Made flying and falling spline flags exclusive with each other
* 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
- 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
* 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