- 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>
* Fixed wrong arenaid use at leave arena queue.
* Fixed memory lost and etc at not virtual EndBattleground call
* Fixed crash at arena join with fake data from client.
* Code cleanups.
* Merge Player::RemovePet and Pet::Remove function code to Pet::Unsummon
This let be sure that in all cases all required steps doen. For example this fix
creature's guardians propertly remove from guardians list.
* Add new pet save mode PET_SAVE_REAGENTS as replacement PET_SAVE_NOT_IN_SLOT+true-arg stable pair in old function args
This will avoid use reagent save arg with wrong different save modes.
* Fixed recently added code with absent check for re-summon protector pet call.
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!
Maybe command not so useful for stable case because spell can be learned,
but it example how can be packet allowed depndent from player possibility
when some functionality base at many packets recieved from client.
Same way possible can be used for auction anywhere, maybe some other cases.
Also it will very usefull for 2.x/1.x branches where no another way... ;)
Only use TalkedToCreature when gossip does not have any following sub menu (and of course when the prepared npc options does not include any gossip)
Signed-off-by: NoFantasy <nofantasy@nf.no>
* Use area id instead zone id for home bind zone info as expected.
This will for example proper show capital name in area himebinding for capital; tavern.
* Clarify that player create zone in fact is area (subzone)
* Implement SPELL_EFFECT_BIND for normal homebinding.
Also support spell target position mode used in 53823/53821 spells
* Add Spell::EffectEmpty for mark spell effects that used but not expect any code in handler.
Example weapon spells that used just as known spell markers for client.
Original patch idea inspirit by Sadikum patch suggestion.
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.
they basicaly should
*autocast 22011
*give player after gossiphello buff 2584
*port players away to another spiritguides, when they die
so this can be done by a script
and maybe eventai
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.
* IsInWorld used to prevent return unexpected not in world objects.
* Delayed operations need to process its in world state.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Note: before this commit hunters can tame exotic pets like any other.
After patch like not propertly contriolled pets will auto-dismiss at loading
if talent not learned.
* Save temporary unsummoned pet to current slot (instead non_in_slot mode) and
prevent save as current pet summoned while temporay unsummon (arena)
* Prevent overwrite temporary summoned pet data
* At player loading set temporary unsummoned pet data instead pet loading
if pet expected to be temporary unsummoned in current player state (loading in taxi flight/etc)
* Restore proper pet at arena leave and unsummon in arena summoned.
Problem exist from client version switch when stable slot amount changed.
In result this has been source problems with stable use (3-4 slots) and possible pet lost in some cases
or "not save state" for summoned pets.
Use enums to avoid repeating problem, use more safe value for not-in-slot save (for summoned pets)
Fixed data preparing for MSG_LIST_STABLED_PETS.
this is done by this script:
ack -c "World.h" | ack :1 | sed 's/:1//' | xargs grep -c sWorld | grep :0 | sed 's/:0//' | xargs sed -i '/#include "World.h"/d'
i didn't checked every change but gcc haven't complained