* This must repolve problem with loot.
Before if some mob killed by group member and then leader changed
then group members can't loot this mob body.
* Possible resolve crashes at loot. Now group storage content not dependent from leader changes.
* It was wasting CPU power as cell-level locking is not needed.
* Future multithreading will be on map-level.
* CellLock was just a 'proxy' between Cell and CellPair and in some cases carried redundant data.
* Some minor cleanup in Cell::Visit/Map::Visit.
* This allow pet use own speed (and all speed affects appiedto pet itself) in combat.
* Apply this speed synhronization to minipets/guardians also.
* Also rename Unit::SetSpeed to SetSpeedRate as more close to real functionality.
This should help the poor homeless that does not have a database defined home at evade (such as "wild summon" without owner).
Signed-off-by: NoFantasy <nofantasy@nf.no>
* use UI64FMTD instead of "%u" for uint64 output
* on most *NIX systems, I64FMT is "%016lX" and not "%016llX"
* also fix typo: renamed GridMap::loadHeihgtData to GridMap::loadHeightData
Note: there are still many warnings from the 3rd party libraries g3dlite and ACE. Those warnings won't be fixed with that commit.
Also, a few warnings from MaNGOS are left, they'll be fixed later.
Signed-off-by: XTZGZoReX <xtzgzorex@gmail.com>
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.
Condition with custom flag civilian and player team only is not sufficient. This update also disallow use *_addon -table (second byte of bytes2) to set flag manually (small chance it may be needed)
Signed-off-by: NoFantasy <nofantasy@nf.no>
former know as heroic_entry we now have 3 of those
which let us chose different creature_templates for different
map-types
normal maps will need a bit more support to use correct
spawnmodes
but for battlegrounds it works already good:
they are divided by levelrange:
0-59 == normal spawn -> spiritguides level 60
60-69 == difficulty=1 -> spritiguides level 70
70-79 == difficulty=2 -> spiritguides level 80
80 == difficulty=3 -> spiritguides level 80
this is needed mostly for alterac valley to get
right creature-templates spawned
and with that all creature->SetLevel hacks could
get removed from alterac valley code
* Rename creature template `heroic_entry` => `difficulty_entry_1`
Possible need add 2 more fields for 2-3
* Use 2 more EventAI EFLAG_* flags for 2-3 difficulty support, update checks.
* Update area trigger code.
Note: support for specialized creature version for difficulties 2-3 not added yet
and will be used same as difficulty 1 mode.
TODO: Rename area triggers heroickey/etc fields ?
* Fixed object is removed from guid->object map but still spawned in world under some conditions
* Fixed possibility to spawn already spawned object
* Fixed objects despawning (missing part for explicitly chanced objects added)
Signed-off-by: ApoC <apoc@nymfe.net>
with that i've implemented all known auras which makes
units invisible for alive.. but that's currently quite hacky
i think best would be if we could set a unit-flag after those auras
getting applied
this reverts 8676 (9c50d9e70314b0cd9eb0fe3bac8040d64a9965a5)
the new flag is from wdb-files so your database should be
already alright
also i've dropped the function Player::CanInteractWithNPCs
cause it was used only in one place and didn't seem to make anything
easier
NOTE for this flag:
it just means that the creature can be seen by ghost-players
too..
so they are still visible for alive players.. unless a special
aura or ther unitflag (spiritguide/healer) disables this..
(see next commit for it)
with this flag you can specify a creature to be only
visible for dead players - this removes all hacks from
spiritguides/spirithealers from code and allows some other
special creatures
i decided to not implement an extra deathstate cause
actualy those creatures are almost equal to living ones
* Add single arg version Unit::AddThreat for just adding to threat list.
* Req. provide schollmask and crit flag for any real threat value for proper threats mod apply.
* Send crit flag in DealDamage as MELEE_HIT_CRIT for spell damage for later send to threat call.
* For not affected by modifiers threat values use SPELL_SCHOOL_MASK_NONE.
* Implement aura SPELL_AURA_MOD_CRITICAL_THREAT (used only in itemset 529 effect).
This patch implements storing guid->object pairs on per map level, this leads
to less locking in ObjectAccessor in case of further multithreaded map update.
For case of cross map guid looking (auras cases) all maps are linked into
ObjectAccessor and can be traversed for this lookup.
Signed-off-by: ApoC <apoc@nymfe.net>
sql won't be included - please look at your database
providers forum
also note, that creature_loot_template id 0
is used for the loot of dead players in this bg
(after a player died and you remove insignia from him..
he not only drops money - he drops some random items too)
further work must be done in better code for adjusting right
levels to creatures - maybe using something similar like it's
done in heroic instances
also quests and creatures needs some scripts in future
thanks to:
netsky - initial start of this patch
bogie - 2nd person writing on this patch
triply, kapatejib, vladimir - code review and suggestions
arrai - for his great tool and help
and all testers / code contributers - I won't write
down a list, else I would forget most probably one ^^
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
those eventindexes will then be used by the battleground-code to decide
which creature belongs to which objective
for example all creatures in alteracvalley which are standing around a tower
will belong to one eventindex then.. the eventindex will be defined through the code
and must be proper documented for db-devs