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

[svn] * Fixed startup error flood if creature model id is 0
* Fixed totems using proper model ids broken after recent change
* Set pet grid activity state to that of caster upon summoning
* Fix a possible crash in ObjectAccessor?
note to self: don't commit anything without 3 days testing. ever. after this one ofc.

Original author: w12x
Date: 2008-10-27 15:28:04-05:00

Files:
1 modified

Legend:

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

    r123 r126  
    6060    if (owner->GetTypeId()==TYPEID_PLAYER && cinfo) 
    6161    { 
    62         if (uint32 modelid = cinfo->GetRandomValidModelId())  
     62        uint32 modelid = 0; 
     63        if(((Player*)owner)->GetTeam() == HORDE) 
     64        { 
     65            if(cinfo->Modelid3) 
     66                modelid = cinfo->Modelid3; 
     67            else if(cinfo->Modelid4) 
     68                modelid = cinfo->Modelid4; 
     69        } 
     70        else 
     71        { 
     72            if(cinfo->Modelid1) 
     73                modelid = cinfo->Modelid1; 
     74            else if(cinfo->Modelid2) 
     75                modelid = cinfo->Modelid2; 
     76        } 
     77        if (modelid) 
    6378            SetDisplayId(modelid); 
    6479        else 
    65         { 
    66             sLog.outErrorDb("No displayid found for the totem with the entry %u! Can't summon it!", GetEntry()); 
    67             return; 
    68         } 
     80            sLog.outErrorDb("Totem::Summon: Missing modelid information for entry %u, team %u, totem will use default values.",GetEntry(),((Player*)owner)->GetTeam()); 
    6981    } 
    7082