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.
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.
* CreatureCreatePos work in 3 modes:
- exactly provided coordinates/orientation/map/phasemask
- exactly object + orientation as coordinates/map/phasemask
- delayed position calculation near provided object at specific dist/angle.
* Use in similar way and for Pet/Vehicle Create functions.
For Totem created new Totem::Create function with some moved in to it totem specific code.
* This let resolve recent problems with creature spawn and preserve fix for cases when
Creature::Create addon/script code expected known correct possition for creature.
Some called from Create code can req. proper pos setup for creature.
Bad side: But in way how currently code orginized impossible setup excetly position for most
Creature sublasses. So in this part need more work.
* Commands .debug update and .modify bit removed as redundent
* Command .debug getvalue now can output values in float/int/hex/bitstring formats
* Command .debug setvalue now ca accept values in int/float/hex/bitstring formats
* Command .debug mod32value renamed to modvaue and can add int/float or apply hex mask
(in 3 modes: |= &= &=~ ) to value in update field
* Command .debug moditemvalue added similar .debug modvalue for item case.
* Command .npc set movetype now propertly update spawned in world creature state.
* Command .modify spell renamed to .debug spellmods and restored to working state.
* Commands .account password and .account set password now allow use quoted strings
for passwords and then now possible set from chat/console passwords with white spaces.
* Many commands converted to new functions without modify functionality
except better error detection in some cases at wrong command syntax use.
* Also fixed warnings in reload commands after prev. chat commit. Thanks to SkirnirMaNGOS for reporting.
We in any case modify args string content at parsing in commands,
so cast it to char* early. This let avoid lot later casts.
Some other code style exist in related code.
To reflect better what the function should actually return and also to clarify when used in misc calculations.
Signed-off-by: NoFantasy <nofantasy@nf.no>
* If player tap creature in group and leave then group will have access to creature loot if not disbanded
* If player tap creature and after join to group then creature loot will accesable only by player
* Also RewardPlayerAndGroupAtKill divided to simgle player and group reward versions used for group tap
and single player tap cases.
* Now expected item limit categories (for example for item 5513 and related)
correctly limited by its amount in inventory.
* Provide and use additional arg in SendEquipError for alt. way get affected
item prototype. This let send to function item id and prevent crash client at
limit category equip errors that required item prototype data.
* Table expected to be store data mirror same data in code:
- explicit spell ids with related expected spell properties like effects, spell family or auras
- implicit requirements for select some spell sets like spell family masks, icons or visual values
* For check can be used .debug spellcheck _console_ only command.
* Main purpose table and related command check code parts for outdated data at client switch.
It also can be used for check data in patch writing time to be sure code correctness.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
* Also implement this table reload
* Static Spell::SendCastResult function for call not from spell code.
Can be also used in scripts where need send explicitly spell cast error to client.
* Also rewrite use SMSG_PLAY_OBJECT_SOUND/SMSG_PLAY_SOUND
Now WorldObject have 2 function for sound level dependent from distance (PlayDistanceSound)
and for not depednet (PlayDirectSound)
* Old Player::PlaySound function removed and uses need to be updated to WorldObject functions
Note: function called for _source_ of sound in different from old function.
* chat command .debug ps removed and .debug playsound can used for bother packects test:
if no selection used SMSG_PLAY_SOUND, if selection exist including self then SMSG_PLAY_OBJECT_SOUND.