[7553] Fixed character save/creating.

This commit is contained in:
VladimirMangos 2009-03-27 06:01:24 +03:00
parent c4d4bb5620
commit b768401438
3 changed files with 1 additions and 7 deletions

View file

@ -197,10 +197,8 @@ void AchievementMgr::SaveToDB()
if(need_execute) if(need_execute)
{ {
CharacterDatabase.BeginTransaction ();
CharacterDatabase.Execute( ssdel.str().c_str() ); CharacterDatabase.Execute( ssdel.str().c_str() );
CharacterDatabase.Execute( ssins.str().c_str() ); CharacterDatabase.Execute( ssins.str().c_str() );
CharacterDatabase.CommitTransaction ();
} }
} }
@ -258,12 +256,10 @@ void AchievementMgr::SaveToDB()
if(need_execute_del || need_execute_ins) if(need_execute_del || need_execute_ins)
{ {
CharacterDatabase.BeginTransaction ();
if(need_execute_del) if(need_execute_del)
CharacterDatabase.Execute( ssdel.str().c_str() ); CharacterDatabase.Execute( ssdel.str().c_str() );
if(need_execute_ins) if(need_execute_ins)
CharacterDatabase.Execute( ssins.str().c_str() ); CharacterDatabase.Execute( ssins.str().c_str() );
CharacterDatabase.CommitTransaction ();
} }
} }
} }

View file

@ -444,7 +444,6 @@ void ReputationMgr::LoadFromDB(QueryResult *result)
void ReputationMgr::SaveToDB() void ReputationMgr::SaveToDB()
{ {
CharacterDatabase.BeginTransaction();
for(FactionStateList::iterator itr = m_factions.begin(); itr != m_factions.end(); ++itr) for(FactionStateList::iterator itr = m_factions.begin(); itr != m_factions.end(); ++itr)
{ {
if (itr->second.Changed) if (itr->second.Changed)
@ -454,7 +453,6 @@ void ReputationMgr::SaveToDB()
itr->second.Changed = false; itr->second.Changed = false;
} }
} }
CharacterDatabase.CommitTransaction();
} }
void ReputationMgr::UpdateRankCounters( ReputationRank old_rank, ReputationRank new_rank ) void ReputationMgr::UpdateRankCounters( ReputationRank old_rank, ReputationRank new_rank )

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "7552" #define REVISION_NR "7553"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__