Also remove team argument from SendDefenseMessage as all texts are sent to all teams, use seperate function to send zone attack message, cleanup some send message functions and remove deprecated send text functions
Thanks to Silverice for feedback!
This system interprets the content of the table `creature_linking_template`. To trigger different actions on different events of the npcs that are linked together.
Possible event/ action combinations can be taken form the flags in CreatureLinkingMgr.h::CreatureLinkingFlags
this allows us update creature's death persistent auras, fall died creatures in natural, non hacky way
also fix the bug that creature starts waypoint movement not from begining at respawning. thanks to Grz3s for reporting
This clearifies that a problem is caused by already applied auras and not double aura in *_addon table.
The double spell entry as well as the invalid spell are filtered on load.
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
Source crash in missing locale strings array size check before access
to it in locale structure.
Also move repeating code for access to wide used localization string arrays to ObjectMgr functions.
TODO: proper solution would be update creatures while in corpse state.
This also would solve problems with death persistent auras that not get updated for died creatures
Spline movement controls movements of server-side controlled units (monster movement, taxi movement, etc).
Proper implementation of effects such as charge, jump, cyclic movement will rely on it.
However, need improve our states system before.
Technical changes:
1. Added linear, catmullrom and bezier3 splines which based on client's algorthims. They can be reused for proper transport position interpolation.
2. Precission increased. There are no more position desync issues since client's position calculation formulas used.
3. Now possible to move by paths with multiple points, send whole path to client.
destination holder still contains info about current destination point, even when movement is disabled/stopped
as a result, creature moves somewhere on client, while stopped on server-side
Now safe allow this casts in like way after completed convertion to ObjectGuid use.
Also simplify code in result allowed auto cast to uint64.
Please _not_ add new uint64 storages (local and in structures) for guid values.
Use creature_template_addon from base entry when addon for difficulty_entry_N does not exist.
It is easier to create data for the exceptions rather than the general.
Signed-off-by: NoFantasy <nofantasy@nf.no>
* Creature regeneration code moved to new virtual function RegenerateAll
* Pet instead direct call own regeneration code overwrite now RegenerateAll
Big thanks to Vladskywolf for problem research and original patch version.
This already checked at apply to creature but startup check more helpful for DB devs.
Also remove use single field structure use for store addon.auras data
This helper change for allow have in future static spawned vehicles as `creature` table data.
Added CreatureInfo::GetHighGuid() high guid selector, and wrapper CreatureData::GetHighGuid()
for most real cases of usage. Also easy get expected guid form by CreatureData::GetObjectGuid(lowguid).
Also fixed some memory lost cases at creature spawn fail.
A new specialized function SetFactionTemporary for creatures are added. It work just like setFaction but has in addition option to set flags.
The flags determine if default faction should be restored and when; most commonly just before respawn and when reaching home after evade.
SCRIPT_COMMAND_SET_FACTION for DB scripts and ACTION_T_SET_FACTION for creature_ai_scripts are now capable of using the system (documentation updated)
The intention of the system is to be able to solve basic events that include faction changes, with the use of database only and in easier ways.
It is advised that DB devs revise current database scripts to check if changes should be made. The same goes for EventAI devs regarding ACTION_T_SET_FACTION.
Signed-off-by: NoFantasy <nofantasy@nf.no>