Remove assertion in SmartScript added in b8625f41bd and handle SmartScripts with GetBaseObject() returning NULL , like SmartTrigger . In this case SmartScript::mTargetStorage cannot be sanitized and might contain references to free'd WorldObjects if the script doesn't last a single Map::Update() call.
Fix memory leak in InstanceSaveMgr added in 1f170c99ef .
Make InstanceSave::SetToDelete() private since it's not supposed to be used by anything other than InstanceSave or its friend class InstanceSaveMgr .
Description:
Currently there is an issue, when you are in FFA areas, but you dont have PvP flag activated.
You should get the PvP-In-Combat delay timer, but instead you just get the usual timer as if you would not fight in PvP.
Reproduction:
1) Get two players in FFA area Gurubashi arena down in the battle area (.tele Gurubashi)
2) Fight each other
3) When stopping combat, the combat state will switch off immediately. But it is supposed to switch off after some delay, because it was a PvP fight.
Closes#11103
Signed-off-by: Duarte Duarte <dnpd.dd@gmail.com>
Prevents fleeing or feared units from going to upper floor ignoring walls/ceilings with mmaps on(and usually get stucked).
Current implementation just randomly selects a distance and angle against the frighting unit, when in narrow circumstance such as underground caves, such targeting point would be at another floor.
Closes#11300
Ref #9475 (needs fixed confirmation)
Core/Players: On CanRewardQuest, use the same item dest vector for all potential rewards
Solves issues where the player has enough bag space for each item individually, but not all of them together.
Example to reproduce previous issue:
Obtain Battle of the Crimson Watch (10781)
Make sure you only have 1 slot available in your inventory
Turn in the quest, watch as you don't receive one of the rewards
SAI and conditions for rogue trainers to provide elegant leter to rogues provided that is level 24 or higher, does not have elegant letter and does not have taken, rewarded or complete the quest which elegant letter starts
Closes#11378
Signed-off-by: DDuarte <dnpd.dd@gmail.com>
There is one incorrect field length related to guilds in the database, which can be used to cause an overflow client-side, by sending CMSG_GUILD_INFO_TEXT with long strings.
The guild information has the same 500 characters client-side limit as the guild bank tab information, but on server-side it can be 65k characters long. A lengthy guild info makes the whole Guild panel unusable.
Length of the other fields match the client's limits in the database: guild bank tab name (16), public note (31), officer note (31), motd (128), guild bank tab info (500).
Closes#11395
Signed-off-by: DDuarte <dnpd.dd@gmail.com>
Fix CMSG_HEARTH_AND_RESURRECT handler trying to resurrect players with 100x hp/mana/energy ( SetHealth()/SetPower() were sanitizing the input anyway ) .
Fix a cooldown issue related to potions allowing Players in combat to use more than 1 potion in a row, especially with high latency.
This also fixes an exploit about using infinite potions in combat just by skipping the client-side check.
The original implementation c064c2e2e1 was missing a check in Spell::CheckCast() about this particular case since Potion cooldown is added only after the Player goes out of combat.
Fixes#1259 .