mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
[svn] *** Source Mangos ***
*Load npc_options at server startup, use cached data at creature gossip menu init. * Also new .reload table command added *Implement npc_option localization support, also store in DB BoxText/BoxMoney/Coded * Use characters.guid instead low guid value from characters.data in charcter enum data prepering for client. * Fixed crash at .pinfo command use from console. * Fixed windows ad.exe build *Creature related code and DB cleanups. * Rename 2 creature_template fields to more clean names and related code update also. * Use enum values instead raw values for type_flags, use halper functions instead code repeating. * Move tamed pet creating code to new function. ** Small code changes to make things compliant with above changes. ** Another rev with big changes so test away. --HG-- branch : trunk
This commit is contained in:
@@ -130,9 +130,10 @@ void WorldSession::HandleCharEnum(QueryResult * result)
|
||||
Player *plr = new Player(this);
|
||||
do
|
||||
{
|
||||
sLog.outDetail("Loading char guid %u from account %u.",(*result)[0].GetUInt32(),GetAccountId());
|
||||
uint32 guidlow = (*result)[0].GetUInt32();
|
||||
sLog.outDetail("Loading char guid %u from account %u.",guidlow,GetAccountId());
|
||||
|
||||
if(plr->MinimalLoadFromDB( result, (*result)[0].GetUInt32() ))
|
||||
if(plr->MinimalLoadFromDB( result, guidlow ))
|
||||
{
|
||||
plr->BuildEnumData( result, &data );
|
||||
++num;
|
||||
@@ -155,18 +156,18 @@ void WorldSession::HandleCharEnumOpcode( WorldPacket & /*recv_data*/ )
|
||||
CharacterDatabase.AsyncPQuery(&chrHandler, &CharacterHandler::HandleCharEnumCallback, GetAccountId(),
|
||||
!sWorld.getConfig(CONFIG_DECLINED_NAMES_USED) ?
|
||||
// ------- Query Without Declined Names --------
|
||||
// 0 1 2 3 4 5 6 7 8
|
||||
"SELECT characters.data, characters.name, characters.position_x, characters.position_y, characters.position_z, characters.map, characters.totaltime, characters.leveltime, characters.at_login, "
|
||||
// 9 10 11
|
||||
"character_pet.entry, character_pet.modelid, character_pet.level "
|
||||
// 0 1 2 3 4 5 6 7 8
|
||||
"SELECT characters.guid, characters.data, characters.name, characters.position_x, characters.position_y, characters.position_z, characters.map, characters.totaltime, characters.leveltime, "
|
||||
// 9 10 11 12
|
||||
"characters.at_login, character_pet.entry, character_pet.modelid, character_pet.level "
|
||||
"FROM characters LEFT JOIN character_pet ON characters.guid=character_pet.owner AND character_pet.slot='0' "
|
||||
"WHERE characters.account = '%u' ORDER BY characters.guid"
|
||||
:
|
||||
// --------- Query With Declined Names ---------
|
||||
// 0 1 2 3 4 5 6 7 8
|
||||
"SELECT characters.data, characters.name, characters.position_x, characters.position_y, characters.position_z, characters.map, characters.totaltime, characters.leveltime, characters.at_login, "
|
||||
// 9 10 11 12
|
||||
"character_pet.entry, character_pet.modelid, character_pet.level, genitive "
|
||||
// 0 1 2 3 4 5 6 7 8
|
||||
"SELECT characters.guid, characters.data, characters.name, characters.position_x, characters.position_y, characters.position_z, characters.map, characters.totaltime, characters.leveltime, "
|
||||
// 9 10 11 12 13
|
||||
"characters.at_login, character_pet.entry, character_pet.modelid, character_pet.level, genitive "
|
||||
"FROM characters LEFT JOIN character_pet ON characters.guid = character_pet.owner AND character_pet.slot='0' "
|
||||
"LEFT JOIN character_declinedname ON characters.guid = character_declinedname.guid "
|
||||
"WHERE characters.account = '%u' ORDER BY characters.guid",
|
||||
|
||||
Reference in New Issue
Block a user