used this script + some manual edit
(i couldn't get out, how to handle comments)
function replace()
{
sed -ri 's/([^a-zA-Z0-9_])'$1'([^a-zA-Z0-9_])/\1'$2'\2/g' ArenaTeam.*
}
replace Id m_TeamId
replace Type m_Type
replace Name m_Name
replace CaptainGuid m_CaptainGuid
replace BackgroundColor m_BackgroundColor
replace EmblemStyle m_EmblemStyle
replace EmblemColor m_EmblemColor
replace BorderStyle m_BorderStyle
replace BorderColor m_BorderColor
replace members m_members
replace stats m_stats
Signed-off-by: balrok <der-coole-carl@gmx.net>
every team will start with 0 rating here
to enable this you have to set your season in the config-file
thanks to danielich for initial patch
Signed-off-by: balrok <der-coole-carl@gmx.net>
Probably fixed bug with not ending battlegrounds - reported in previous commit message
Fixed player will loose arena rating if
1. he doesn't click on enter rated arena window - and timer will expire
2. he logs out during time he is invited to rated arena match
3. if he logs out during fight in rated arena match
Patch is not tested, i will test it as soon as possible.
Signed-off-by: Triply <triply@getmangos.com>
1) comparison singed and unsigned values
2) redundent includes
3) wrong constructor :-part field initilization
4) unused not-/*name*/-guarded args in template/virtual functions that not required like args.
5) explicitly list not implemented achievement types.
Also bugs fixed:
1) Drop wrong phase mask 0 check in WorldObject::InSamePhase.
2) ArenaTeamMember::ModifyPersonalRating incorrect work with move points in negative with infinity values in result.
3) ArenaTeam::SaveToDB code send uint64 value to string with arg format %u.
* Replace max bg type checks by DBC valid index check
* Use in functions and fields BattlegroundTypeId type instead uint32
* Fixed wrong use bg queue ids instead bg type ids in queue update/remove function calls.
Many bg have same raw values for type id and queue id but some can be affected by this bug:
BATTLEGROUND_EY, BATTLEGROUND_SA, and all areans (with small arena/team size exceptions)
* Move Battlemaster to bg type ids map fron ObjectMgr to BatteleGroundMgr.
* Remobe redundent for header itself includes for BG headers.
* Use Auction location enum instead raw valus.
Many thanks also to:
Balrok@github.com for long time updating.
Triply@github.com for great work in rewriting process.
All who I forget to name.
Signed-off-by: ApoC <apoc@nymfe.net>
i used this script
for i in ls *.[ch]*; do cat $i | sed -r 's/(.*for.*iterator.*;\
*)([a-z0-9\_\*]+)\ *\+\+(.*)/\1++\2\3/' > /tmp/mangos/$i; done
for i in ls *.[ch]*; do cp /tmp/mangos/$i $i; done
and rechecked it with my eyes, if everything is right
i took only for-loops cause they can be gathered easier with a script
Signed-off-by: hunuza <hunuza@gmail.com>
Note: Using SetUInt32ValueInDB() is still not safe, because it's executed async.
Three possible solutions:
1) remove data field
2) get rid of SetUInt32ValueInDB() calls (probably not possible)
3) make SaveValuesArrayInDB() executed directly