Also make more wide set achievement type criterias expected requirement in DB table.
Original patch in achievement call part provided BudIcePenguin.
Prepared to mangos sources by Burned@ru-mangos.ru
* Drop Battleground.QueueAnnouncer.Enable and Battleground.QueueAnnouncer.PlayerOnly
* Add Battleground.QueueAnnouncer.Join with 0..2 values (1=to joined player, 2=to world)
* Add Battleground.QueueAnnouncer.Start for start bg event
Also fixed bug when not rated arenas announced as BG announces
Also lost mangosd.config changes from prev commit.
it will now correctly drop the flag and correctly remove the player from
eye of the storm objectives
+ also avoid the spamming of all "Player not found!" messages in battlegrounds
maybe all existing "player not found!" places should now get an assert(false)
since this shouldn't happen anymore
+ also better error output in GetBattleGroundQueueIdFromLevel
This reverts commit 72f7a7ee56c63672faa7786b1d162a7a3b9ab406.
This is temporary revert due to bug in ACE_Thread_Mutex.
Original code itself in commit has no problem.
Conflicts:
src/shared/revision_nr.h
* Move send functions to new MailDraft class from WorldSession
* Simplify use different args combinations used in SendMailTo
by groupping its by functionality in Helper classes. This also will prevent wrong way use args combinations.
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
I couldn't remove AddObject and m_bgObjects from code
cause it's still needed for buffobjects.. later
the poolsystem must be rewritten, so that it'll work for instances too
then those objects can be removed
(it would be possible to take the eventsystem for those spawns too - but
this would be the wrong way to handle it)
they are spawned in all arenas 60 seconds after start
so i implemented this function in BattleGround.cpp
maybe we should use BattleGroundAA for such things
then we also can drop all arena-files, cause
all arenas are working in the same way
(at least those which are currently implemented)
i added a map m_ActiveEvents which will track all current active events
it's allways key:event1 -> value:event2 so it's like a one dimensional array
which contains current active event2..
i only need one event2 in this list, cause i only want to allow one event2 at
the same time if other event2 are also active right now - i would just despawn
it
(for example (numbers not real) arathi basin stables are event1=3 and have 5
states (alliance assault, horde assault, neutral...) so every state has an
event2 index and only one state at a time is possible (so if we spawn
horde-contested gameobjects/creatures, we will despawn everything else)
OnObjectDBLoad - generic implementation for this function:
will automaticly spawn or not spawn.. open (doors) or not open
gameobjects/creatures
doors:
i use event1=254 and event2=0
IsDoor(event1,event2) - just a check if this event could be a door (mostly not
needed for bg-subclasses)
OpenDoorEvent(event1,event2) - opens the door (used in bg subclass cause some
doors also must be despawned)
SpawnEvent(event1, event2, bool spawn)
spawn=true says all related gameobjects/creatures getting spawned, else despawned
will despawn all event2 in event1 which are not equal to the
event2-parameter
also this function will set the right values in m_ActiveEvents
IsActiveEvent(event1,event2) - returns true if event is active
this makes those functions independent from the bg_objects vector
also dooropen and doorclose will now accept only guid
additional i removed the comments around spawnbgcreatures-function
also i updated this function, so that it'll work
all warnings from Wunused
and some from Wall
cause unused may be most interesting for some:
they were in following files:
src/game/Level2.cpp
src/game/Map.cpp
src/game/SpellAuras.cpp
src/game/Unit.cpp
src/mangosd/Master.cpp
but i guess mostly someone just fogot to remove this code
for some unsigned vs signed warnings i used:
ack "for.*int .*size\(\)" | ack -v uint
also note for coding:
if you do something like
if( a && b || c)
just place parentheses around (a && b) && always will have
precedence over || but without parentheses this could be overseen
quite fast (at least that's my guess why gcc will warn for this)
Signed-off-by: balrok <der-coole-carl@gmx.net>
Rename m_TeamScores500disadvantage to m_TeamScores500Disadvantage, and optimize its update.
Patch is tested.
Signed-off-by: Triply <triply@getmangos.com>
* 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>
* Fixed leak in BattleGround::m_PlayerScores at BattleGround::Reset,
add and use BattleGroundScoreMap typedef
* Delete AreaTeam objects stored in global map at shutdown
* Delete Corpse objects stored in global map at shutdown
* Store guild bank log entries as objectes instead pointers in log event lists
* including new achievement createria data type ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_LOSS_TEAM_SCORE
Note: Some achivement creteria for success need data in `achievement_criteria_data`
score is used in every battleground (not arena)
so we can use it as a virtual variable to access
it also from BattleGround-class
Signed-off-by: balrok <der-coole-carl@gmx.net>
* Call it from Map::AddObjectToRemoveList and remove now not needed explcit calls
* Create Gameobject version to make GO with owner more safe for remove
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Also added ACHIEVEMENT_CRITERIA_DATA_TYPE_VALUE and support
this criteira special cases base at `achievement_criteria_data`
that required DB support.
* Replace platform seelction MaNGOS code for select format descriptor for uint64 by using ACE define.
I64FMTD renamed to UI64FMTD for more clear name.
* Add new define UI64LIT (base at ACE seelction) for build portables uint64 literals.
Please always use UI64LIT(0x00001) instead less portable 0x00001LL
* 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.