Skip to content

Commit

Permalink
Fix bug where new teams wouldn't get sent, fix MSSQL close clan
Browse files Browse the repository at this point in the history
  • Loading branch information
Asunaya committed Oct 17, 2017
1 parent ede7560 commit 6bb6a58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions MatchServer/MMatchStage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,13 @@ void MMatchStage::UpdateWorldItems()

void MMatchStage::ResetTeams()
{
auto Team = GetRecommandedTeam();
for (auto&& Object : GetObjectList())
{
if (Object->GetEnterBattle())
continue;

Object->SetTeam(Team);
Object->SetTeam(GetRecommandedTeam());
MGetMatchServer()->StageTeam(Object->GetUID(), GetUID(), Object->GetTeam());
}
}

Expand Down
5 changes: 3 additions & 2 deletions MatchServer/MSSQLDatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ static TCHAR g_szDB_GET_CLID_FROM_CLANNAME[] = _T("{CALL spGetCLIDFromClanName (
static TCHAR g_szDB_CREATE_CLAN[] = _T("{CALL spCreateClan ('%s', %d, %d, %d, %d, %d)}");
static TCHAR g_szDB_CREATE_CLAN2[] = _T("{CALL spCreateClan ('%s', %d)}");
static TCHAR g_szDB_RESERVE_CLOSE_CLAN[] = _T("{CALL spReserveCloseClan (%d, '%s', %d, '%s')}");
static TCHAR g_szDB_CLOSE_CLAN[] = _T("{CALL spCloseClan (%d, '%s', %d, '%s')}");
static TCHAR g_szDB_CLOSE_CLAN[] = _T("{CALL spCloseClan (%d, '%s', %d)}");
static TCHAR g_szDB_DELETE_CLAN[] = _T("{CALL spDeleteClan (%d, '%s')}");
static TCHAR g_szDB_ADD_CLAN_MEMBER[] = _T("{CALL spAddClanMember (%d, %d, %d)}");
static TCHAR g_szDB_REMOVE_CLAN_MEMBER[] = _T("{CALL spRemoveClanMember (%d, %d)}");
static TCHAR g_szDB_UPDATE_CLAN_GRADE[] = _T("{CALL spUpdateClanGrade (%d, %d, %d)}");
Expand Down Expand Up @@ -1898,7 +1899,7 @@ bool MSSQLDatabase::CloseClan(int nCLID, const TCHAR* szClanName, int nMasterCID
auto temp1 = FilterSQL(szClanName);

CString strSQL;
strSQL.Format(g_szDB_CLOSE_CLAN, nCLID, temp1.c_str(), nMasterCID);
strSQL.Format(g_szDB_DELETE_CLAN, nCLID, temp1.c_str());
Impl->m_DB.ExecuteSQL(strSQL);
}
catch (CDBException* e)
Expand Down

0 comments on commit 6bb6a58

Please sign in to comment.