* Added basic infrastructure for visibility update in case difference player and current view point.
Just for note: seletect additional arg way beacuse repeatable search object will slow but store pointer will not safe,
so use middle case: get view point pointer early as possible at visibility updates.
* Implement dynamic object and creature activisation while it's target of far sight spell effect
* Use this for SPELL_AURA_BIND_SIGHT, SPELL_AURA_FAR_SIGHT and SPELL_EFFECT_ADD_FARSIGHT.
* Note2: some spyglass like spells let look _around_ at long distance, this hard implement in current grid loading system
Without additional changes and not implemented (you will see empty area without creatures in likes case)
* Also fixed warning spam at CMSG_MOVE_SET_CAN_FLY_ACK receive by use proper packet sructure reading.
* Drop learning form passives at form psell learning, and cast it explictly from code in all cases.
* Drop cast form passives at learning.
* Note: talents that have dependent form time passives still work in original way: learned and casted at learn if need.
* Drop hack for spell 24907 casting at form apply: it casted fines as result normal triggered effect in related form spell.
Original patch provided by nos4r2zod.
Added config options to set count of eventlog records stored in DB.
Attached SQL files will DROP existing and create new tables. Make sure you create backup (if you need old data).
Renamed few variables in Guild class.
Signed-off-by: Triply <triply@getmangos.com>
This should fix problem that players who logged off during BG are after every
next login into game teleported to BG entry position.
Signed-off-by: ApoC <apoc@nymfe.net>
* Introduced new table character_battleground_data
* Entry point is now stored on BG enter event not join event
* Entry point for dungeons is now correctly set to nearest graveyard
(this prevent well known assert in GetInstance because of porting to already destroyed instance)
* Teleporting from BG correctly restore mount state
* Teleporting from BG correctly restore taxi flight
(in multipath flight you will end up in nearest transition point on the route)
Signed-off-by: ApoC <apoc@nymfe.net>
* Check new continent requirement by SPELL_ATTR_EX4_CAST_ONLY_IN_OUTLAND in
SpellMgr::GetSpellAllowedInLocationError.
* Also in this function let ignore any area requirement in GM-mode (except client side checks ofc if use spellbook/item)
* For fly form/mount auras check only speciaal reqirement like special fly skill and ignore it for dead state.
* Drop explicit fly auras drop at zone update, now this part GetSpellAllowedInLocationError functionality.
* Allow in `spell_area` have data deepndent from ghost auras
This all allow implement apply spells 55173/55164 to player ghost wiht DB support in `spell_area`
Small changes also to prevent visual "fall" flight form for viewer at login,
and another changes to prevent recasting default warrior stance.
This also resolve bug with not removing some form bonuses at lost form at re-login.
* Allow add to DB data only for first rank in table `mangos_spell_bonus_data` and `mangos_spell_proc_event`.
* Copy data for other ranks for speedup use at loading for this data and data from `spell_proc_item_enchant`.
* Added a new SQL table, spell_proc_item_enchant, for "custom" ppmRates on Item Enchants that do not use auras.
With table data this must fix ppm for effect from 8033 and ranks enchanting, and item 6947/10918 and ranks enchanting.
* Implemented SPELLMOD_FREQUENCY_OF_SUCCESS (26).
That must fix work talent 14113, spell 32645 with ranks, glyph 41094 and item set effect 64917 in frequency part.
Thanks to MaS0n as author alternative patch that partly used in this patch.
Thanks to Thenecromancer as author alternative patch that ideas inspire MaS0n's patch writing and then this patch also.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Note: for avoid double counting must be removed C++ scripts and EventAI scripts that do same thing in old way.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Also implement KillCreditN field check at loading.
* Implement use `consumable` field in gameobject template for gameobject required explcit despawn at use.
* Move gameobject template fields cech function from Gameobject to gameobject template class, and update callers.
* Cast spells at gameobject use with gameobject guid as original caster guid, as already used in some other cases.
Also some code logic cleanups.
Changes let make more cleanups in base map access and other places,
but this chnages not inlcuded in patch.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>