mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[7330] Code warnings and style cleanups. Some bugs fixes.
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.
This commit is contained in:
parent
373af9905d
commit
9b3daf3933
26 changed files with 211 additions and 141 deletions
|
|
@ -632,11 +632,13 @@ void ArenaTeam::SaveToDB()
|
|||
{
|
||||
// save team and member stats to db
|
||||
// called after a match has ended, or when calculating arena_points
|
||||
CharacterDatabase.BeginTransaction();
|
||||
CharacterDatabase.PExecute("UPDATE arena_team_stats SET rating = '%u',games = '%u',played = '%u',rank = '%u',wins = '%u',wins2 = '%u' WHERE arenateamid = '%u'", stats.rating, stats.games_week, stats.games_season, stats.rank, stats.wins_week, stats.wins_season, GetId());
|
||||
for(MemberList::iterator itr = members.begin(); itr != members.end(); ++itr)
|
||||
{
|
||||
CharacterDatabase.PExecute("UPDATE arena_team_member SET played_week = '%u', wons_week = '%u', played_season = '%u', wons_season = '%u', personal_rating = '%u' WHERE arenateamid = '%u' AND guid = '%u'", itr->games_week, itr->wins_week, itr->games_season, itr->wins_season, itr->personal_rating, Id, itr->guid);
|
||||
CharacterDatabase.PExecute("UPDATE arena_team_member SET played_week = '%u', wons_week = '%u', played_season = '%u', wons_season = '%u', personal_rating = '%u' WHERE arenateamid = '%u' AND guid = '%u'", itr->games_week, itr->wins_week, itr->games_season, itr->wins_season, itr->personal_rating, Id, GUID_LOPART(itr->guid));
|
||||
}
|
||||
CharacterDatabase.CommitTransaction();
|
||||
}
|
||||
|
||||
void ArenaTeam::FinishWeek()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue