[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:
KingPin
2008-11-05 09:22:56 -06:00
parent a1981ecc77
commit 62ed044d08
23 changed files with 301 additions and 106 deletions

View File

@@ -1796,7 +1796,8 @@ bool ChatHandler::HandlePInfoCommand(const char* args)
else
{
accId = objmgr.GetPlayerAccountIdByGUID(targetGUID);
Player plr(m_session); // use current session for temporary load
WorldSession session(0,NULL,SEC_PLAYER,0,0,LOCALE_enUS);
Player plr(&session); // use fake session for temporary load
plr.MinimalLoadFromDB(NULL, targetGUID);
money = plr.GetMoney();
total_player_time = plr.GetTotalPlayedTime();
@@ -4132,6 +4133,13 @@ bool ChatHandler::HandleCreatePetCommand(const char* args)
{
Player *player = m_session->GetPlayer();
Creature *creatureTarget = getSelectedCreature();
if(!creatureTarget || creatureTarget->isPet() || creatureTarget->GetTypeId() == TYPEID_PLAYER)
{
PSendSysMessage(LANG_SELECT_CREATURE);
SetSentErrorMessage(true);
return false;
}
CreatureInfo const* cInfo = objmgr.GetCreatureTemplate(creatureTarget->GetEntry());
// Creatures with family 0 crashes the server
@@ -4148,13 +4156,6 @@ bool ChatHandler::HandleCreatePetCommand(const char* args)
SetSentErrorMessage(true);
return false;
}
if(!creatureTarget || creatureTarget->isPet() || creatureTarget->GetTypeId() == TYPEID_PLAYER)
{
PSendSysMessage(LANG_SELECT_CREATURE);
SetSentErrorMessage(true);
return false;
}
// Everything looks OK, create new pet
Pet* pet = new Pet(HUNTER_PET);