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.
* Fix problem with complete quest when quest start item == quest source item.
And source item not have max items amount setting.
* Avoid remove start item for case when it will re-added at next code line as source item
- Script library presence is now optional.
- Some script hooks have new names. Scripting libraries need to be adjusted accordingly.
Signed-off-by: zergtmn <zerg@myisp.com>
Create new table and convert existing data.
Simplify how game event quests are activated during event by adding generic function to set quest active/inactive.
Any quest in game_event_quest are disabled until event start (and deactivated once stopped)
Signed-off-by: NoFantasy <nofantasy@nf.no>
Create enum for SpecialFlags (database flags and internally computed)
Added related functions for specialFlags and update code accordingly.
Signed-off-by: NoFantasy <nofantasy@nf.no>
Added ObjectGuid version Aura::GetCasterGuid()
But for prevent big problen with backporting AuraHolder
to mangos-0.12 in most cases still used old uint64 version
Aura::GetCasterGUID.
Recommended use new version where possible in clean way
as done for some cases in commit already.
Also other classes have been affected, due to the use of search&replace.
This will probably break some patches and 3rd party libraries, so make sure to update them if required.
Thanks to Phille for the original idea and patch!
* Player::StartTimedAchievementCriteria can be used for activate timer
for specific explicitly starting timed achievement by timedRequirementId
in script.
* for ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST this done in core.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
* This let make map local way access for cases when player/all units
expected to be at same map (for scripts cases for example).
Ofc, still exist many places where code expect world wide player search.
Spell casting for support far target cases, groups/guilds/chat/etc packets
* Function Unit::GetUnit depricated and will removed soon.
* Function GetCreatureOrPetOrVehicle renamed to less horriable GetAnyTypeCreature name.
As result, gossip for GO is now possible. Moved related data structures and remove useless from code.
Please note that after some time, table npc_gossip will be fully removed (use menuId in _template in relation to gossip_menu as replacement).
Special thanks to GriffonHeart for help with research, discussions and ideas of code and thanks to Vladimir for helpful input.
Signed-off-by: NoFantasy <nofantasy@nf.no>
Adjust arguments passed in functions accordingly, for easier implementation of gossip for Gameobjects in future.
Some additional code cleanup in affected functions.
QuestLevel -1 is now to be used for dynamic quest level instead of older 0. DB support needed for update of quests.
Signed-off-by: NoFantasy <nofantasy@nf.no>
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.