*Update to Mangos 6902. Source: Mangos.

*Skipped rev: rev 6893, some code about waypoint movement.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-12-12 11:21:28 -06:00
parent 135f39a5ef
commit b6c288ca9f
84 changed files with 785 additions and 705 deletions

View File

@@ -261,7 +261,7 @@ Guild * ObjectMgr::GetGuildById(const uint32 GuildId) const
return NULL;
}
Guild * ObjectMgr::GetGuildByName(std::string guildname) const
Guild * ObjectMgr::GetGuildByName(const std::string& guildname) const
{
for(GuildSet::const_iterator itr = mGuildSet.begin(); itr != mGuildSet.end(); ++itr)
if ((*itr)->GetName() == guildname)
@@ -297,7 +297,7 @@ ArenaTeam* ObjectMgr::GetArenaTeamById(const uint32 ArenaTeamId) const
return NULL;
}
ArenaTeam* ObjectMgr::GetArenaTeamByName(std::string arenateamname) const
ArenaTeam* ObjectMgr::GetArenaTeamByName(const std::string& arenateamname) const
{
for(ArenaTeamSet::const_iterator itr = mArenaTeamSet.begin(); itr != mArenaTeamSet.end(); ++itr)
if ((*itr)->GetName() == arenateamname)
@@ -1475,7 +1475,7 @@ uint32 ObjectMgr::GetPlayerAccountIdByGUID(const uint64 &guid) const
return 0;
}
uint32 ObjectMgr::GetPlayerAccountIdByPlayerName(std::string name) const
uint32 ObjectMgr::GetPlayerAccountIdByPlayerName(const std::string& name) const
{
QueryResult *result = CharacterDatabase.PQuery("SELECT account FROM characters WHERE name = '%s'", name.c_str());
if(result)
@@ -6293,7 +6293,7 @@ bool isValidString(std::wstring wstr, uint32 strictMask, bool numericOrSpace, bo
return false;
}
bool ObjectMgr::IsValidName( std::string name, bool create )
bool ObjectMgr::IsValidName( const std::string& name, bool create )
{
std::wstring wname;
if(!Utf8toWStr(name,wname))
@@ -6307,7 +6307,7 @@ bool ObjectMgr::IsValidName( std::string name, bool create )
return isValidString(wname,strictMask,false,create);
}
bool ObjectMgr::IsValidCharterName( std::string name )
bool ObjectMgr::IsValidCharterName( const std::string& name )
{
std::wstring wname;
if(!Utf8toWStr(name,wname))
@@ -6321,7 +6321,7 @@ bool ObjectMgr::IsValidCharterName( std::string name )
return isValidString(wname,strictMask,true);
}
bool ObjectMgr::IsValidPetName( std::string name )
bool ObjectMgr::IsValidPetName( const std::string& name )
{
std::wstring wname;
if(!Utf8toWStr(name,wname))
@@ -7004,7 +7004,7 @@ void ObjectMgr::LoadGameTele()
sLog.outString( ">> Loaded %u game tele's", count );
}
GameTele const* ObjectMgr::GetGameTele(std::string name) const
GameTele const* ObjectMgr::GetGameTele(const std::string& name) const
{
// explicit name case
std::wstring wname;
@@ -7049,7 +7049,7 @@ bool ObjectMgr::AddGameTele(GameTele& tele)
new_id,tele.position_x,tele.position_y,tele.position_z,tele.orientation,tele.mapId,tele.name.c_str());
}
bool ObjectMgr::DeleteGameTele(std::string name)
bool ObjectMgr::DeleteGameTele(const std::string& name)
{
// explicit name case
std::wstring wname;