[z2358] Add support for the Rabbit Day

This adds a new config option "RabbitDay" - don't forget to set it to our
suggested value (see config file)!

Signed-off-by: DasBlub <DasBlub@gmail.com>

(based on commit [12433] - 3731b9d)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1955] - 47fa1e5)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2359] Fix a mistake from [z2313]

There was a glitch in the rare case of a valid map which had no areatrigger_teleport possibility to be teleport upon.

Also improve some DBError strings (thanks to crackm for pointing)

(based on commit [12435] - bb9df78)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1956] - 66624b8)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2360] Implement spell 24324

(based on commit [12437] - 62c167d)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1957] - dcb4907)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
Change default reaction on aggro for non-combat movement mobs

This will prevent npcs with non-combat-movement to interrupt (scripted) in-combat movement when AttackStart is called

(based on commit 4e5b1e3)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit 8727067)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2361] Limit targets of spell 10258

Also add positive exception for this one

(based on commit [12438] - 612897d)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1958] - 819d6a7)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2362] Implement spells 19869 and 20037

Also add stacking exception for spells 19832 and 23014

(based on commit [12439] - 7d53fcd)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1959] - 6030c43)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2363] Add support for condition_id to spell_area table

Add a new column `condition_id` to table `spell_area`
This column is intended to replace the columns
- quest_start
- quest_start_active
- quest_end
- racemask
- gender

Attention DB-Devs: A tool for convertion will be linked in the comments :)
Final removal of these no more required columns will be done after some time, so that you can adapt and provide UPDATE support for this change :)

Also simplify and gernalize the apply/remove code for these spell-area auras
SQL-Changes for spell_area.condition_id

Add first step of spell_area.conditionId

Add second step of spell_area.conditionId

This removes caching by quest_id
This will be slightly slower, but only expected in case of quest-accept/remove cases.

Some improvements and generalisations

(based on commit [12440] - ef5e75a)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1960] - 94905d1)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2364] Maintain compatibility with master

(based on commit [12441] - e91ad73)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1961] - 3523fee)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2365] Reorder handling in Creature::SetDeathState(JUST_ALIVE) case

This will behave more logical in case of root/stunn or similar auras which are to be loaded by _addon tables

(based on commit [12442] - 097f902)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1962] - 24ac1f4)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2366] Prevent annoying client freezes

It appears it is possible for the client freezes if movement of stunned mobs is sent (combined flags of SPLINE_ENABLED and SPLINE_ROOTED).
This fix cannot be considered proper, but there should be no sideeffects.

HUGE thanks for kid10 figuring the source of some of these freezes by manually testing individual commits.
Unexpected source(*) is [12225] (ec6772948572f304f97e956c83cb34b2)

(*) Well, the thing that made these freezes visual... - I consider these source to be older and much better hidden!

(based on commit [12443] - 1d04658)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1963] - 6e96889)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2367] Remove dropped SingletonImpl.h file from VC project files

(based on commit [12444] - d8d526d)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1964] - 4173785)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2368] Add const Group member iteration

(based on commit [12445] - 18b45ad)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1965] - 2b2d5f1)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2369] Implement CONDITION_DEAD_OR_AWAY

Usage of value1:
* 0: return true if player is dead (or NULL)
* 1: return true if all members of player's group is dead (or no player)
* 2: return true if all players in an instance are dead
* 3: return true if the source-creature is dead
Usage of value2:
  if value2 is provided, then this is taken as range. if the player is outside of this range the condition returns true as well

(based on commit [12446] - ac633db)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1966] - b3cbf14)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2370] Implement SCRIPT_COMMAND_TERMINATE_COND

This command is used to terminate a script execution based on a condition (from `conditions` table)
* datalong = condition_id
* datalong2 = fail-quest
* data_flags & SCRIPT_FLAG_COMMAND_ADDITIONAL terminate when condition is false. ELSE(normal case) terminate when condition is true

(based on commit [12447] - 577de26)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1967] - 8598e5d)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2371] Fix typo. Thanks also to vladimir for pointing

Signed-off-by: Schmoozerd <schmoozerd@cmangos>

(based on commit [12448] - f928e8c)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1968] - 9ede688)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2372] Fix send-speed opcode sending

SMSG_FORCE_*_SPEED_CHANGE is only sent to the player whose speed changes
Also it appears that the other MSG_MOVE_SET_*_SPEED/RATE should be wrapped into SMSG_COMPRESSED_MOVES (not yet implemented)

Thanks to lyn for pointing to the problem, and researching it down to these opcode sendings as well as testing

(based on commit [12449] - 6b752db)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1969] - efe19a7)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2373] Implement new TempSummon types

* Add TEMPSUMMON_TIMED_OR_DEAD_DESPAWN to remove a creature after a time or when it despawns
* Add TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN to remove a creature after a time or when it died

(based on commit [12450] - d2120f3)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1970] - f853d3f)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2374] Implement virtual void HealedBy

(based on commit [12451] - 6c2efcd)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1971] - 1936940)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2375] Add GetFixateTargetGuid() function

(based on commit [s1974] - 43ef75c)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2376] Simplify use of CombatReach

(based on commit [12455] - 8a3ba33)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1976] - 1ed612f)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>