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.
Also
* Fixed some amount wrong uses low guids as full player guids.
* Add private without body ObjectGuid(uint32 const&) for catch wrong assigns low guids to ObjectGuid.
In some cases need assign "0" guid, then use ObjectGuid() instead.
* Fixed .pdump commands work.
This change will:
* make it easier to use cached data directly without any modifications
* correct issues regarding invisible models
* simplify certain aspects of model selection itself and make it somehow easier to control and maintain special cases.
Two new fields added to creature_model_info, to store modelid_alternative and modelid_other_team
* _alternative holds an alt. model, for cases where gender are the same, or is not male/female.
* _other_team is generally used for totem models, but may have future use.
This commit will possibly break a few things (visually) and will require DB projects to update their creature_template models data.
It is advised to use cache data as-is, and in addition fill creature_model_info for certain models, totems in particular, for expected appearance.
Signed-off-by: NoFantasy <nofantasy@nf.no>
Adjusting field names and type, and send data accordingly to avoid client crash not using auto-generated id.
Due to the nature of the primary keys, two tables are truncated. Be sure to make backup if you have data you do now want to loose.
In addition, speed up load times of data from quest_poi_points, thanks Hunuza for helping out.
* Send coordinates of corpse on world map, if outside instance.
* Send coordinates of instance entrance, if inside instance.
Thanks to Ceris and Lightguard for helping with research/code.
* Use this fucntions in some case.
* Change some packets to form: read fields first check later for better control recieved packets structure.
* Fix CMSG_STAND_STATE_CHANGE packet structure to more correct.
CHECK_PACKET_SIZE was pretty error prone; once it was forgotten mangosd
could crash due to the asserts in ByteBuffer.h. That was exploitable by
malicious players.
Furthermore, there were duplicate checks: Additionally to
CHECK_PACKET_SIZE, the ByteBuffer assertions keept an eye
on not exceeding the packet boundaries - just to crash the server for
sure in such a case.
To prevent memory leaks or other undesirable states, please read in
every handler all variables _before_ doing any concrete handling.