Show
Ignore:
Timestamp:
11/19/08 13:42:33 (17 years ago)
Author:
yumileroy
Message:

[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.

Original author: KingPin?
Date: 2008-11-05 09:22:56-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Level2.cpp

    r163 r168  
    17971797    { 
    17981798        accId = objmgr.GetPlayerAccountIdByGUID(targetGUID); 
    1799         Player plr(m_session);                              // use current session for temporary load 
     1799        WorldSession session(0,NULL,SEC_PLAYER,0,0,LOCALE_enUS); 
     1800        Player plr(&session);                               // use fake session for temporary load 
    18001801        plr.MinimalLoadFromDB(NULL, targetGUID); 
    18011802        money = plr.GetMoney(); 
     
    41334134        Player *player = m_session->GetPlayer(); 
    41344135        Creature *creatureTarget = getSelectedCreature(); 
     4136     
     4137        if(!creatureTarget || creatureTarget->isPet() || creatureTarget->GetTypeId() == TYPEID_PLAYER) 
     4138        { 
     4139                PSendSysMessage(LANG_SELECT_CREATURE); 
     4140                SetSentErrorMessage(true); 
     4141                return false; 
     4142        } 
    41354143 
    41364144        CreatureInfo const* cInfo = objmgr.GetCreatureTemplate(creatureTarget->GetEntry()); 
     
    41494157                return false; 
    41504158        } 
    4151          
    4152         if(!creatureTarget || creatureTarget->isPet() || creatureTarget->GetTypeId() == TYPEID_PLAYER) 
    4153         { 
    4154                 PSendSysMessage(LANG_SELECT_CREATURE); 
    4155                 SetSentErrorMessage(true); 
    4156                 return false; 
    4157         } 
    41584159 
    41594160        // Everything looks OK, create new pet