Show
Ignore:
Timestamp:
09/20/09 20:50:14 (3 years ago)
Author:
valroft
Message:

- Fully reverted LocalizationMgr?. It wasn't being used, and really only wasted memory. Localize your own DBs.
- Run the SQL update 2009_09_20_localizations.sql.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/hearthstone-world/QueryHandler.cpp

    r19 r21  
    9494                        return; 
    9595 
    96                 LocalizedCreatureName * lcn = (language>0) ? sLocalizationMgr.GetLocalizedCreatureName(entry, language) : NULL; 
    97  
    98                 if(lcn == NULL) 
    99                 { 
    100                         OUT_DEBUG("WORLD: CMSG_CREATURE_QUERY '%s'", ci->Name); 
    101                         data << (uint32)entry; 
    102                         data << ci->Name; 
    103                         data << uint8(0) << uint8(0) << uint8(0); 
    104                         data << ci->SubName; 
    105                 } 
    106                 else 
    107                 { 
    108                         OUT_DEBUG("WORLD: CMSG_CREATURE_QUERY '%s' (localized to %s)", ci->Name, lcn->Name); 
    109                         data << (uint32)entry; 
    110                         data << lcn->Name; 
    111                         data << uint8(0) << uint8(0) << uint8(0); 
    112                         data << lcn->SubName; 
    113                 } 
     96                OUT_DEBUG("WORLD: CMSG_CREATURE_QUERY '%s'", ci->Name); 
     97                data << (uint32)entry; 
     98                data << ci->Name; 
     99                data << uint8(0) << uint8(0) << uint8(0); 
     100                data << ci->SubName; 
    114101                data << ci->info_str; //!!! this is a string in 2.3.0 Example: stormwind guard has : "Direction" 
    115102                data << ci->Flags1;   
     
    162149                return; 
    163150 
    164         LocalizedGameObjectName * lgn = (language>0) ? sLocalizationMgr.GetLocalizedGameObjectName(entryID, language) : NULL; 
    165      
    166151        data << entryID; 
    167152        data << goinfo->Type; 
    168153        data << goinfo->DisplayID; 
    169         if(lgn) 
    170                 data << lgn->Name; 
    171         else 
    172                 data << goinfo->Name; 
     154        data << goinfo->Name; 
    173155 
    174156        data << uint8(0) << uint8(0) << uint8(0) << uint8(0) << uint8(0) << uint8(0);   // new string in 1.12 
     
    271253                        return; 
    272254 
    273                 LocalizedItemPage * lpi = (language>0) ? sLocalizationMgr.GetLocalizedItemPage(pageid,language):NULL; 
    274255                data.Clear(); 
    275256                data << pageid; 
    276                 if(lpi) 
    277                         data.Write((uint8*)lpi->Text, strlen(lpi->Text) + 1); 
    278                 else 
    279                         data.Write((uint8*)page->text, strlen(page->text) + 1); 
     257                data.Write((uint8*)page->text, strlen(page->text) + 1); 
    280258 
    281259                data << page->next_page; 
     
    302280        else 
    303281        { 
    304                 LocalizedItem * li = (language>0) ? sLocalizationMgr.GetLocalizedItem(itemid, language) : NULL; 
    305                 if(li) 
    306                         reply << li->Name; 
    307                 else 
    308                         reply << proto->Name1; 
     282                reply << proto->Name1; 
    309283        } 
    310284        SendPacket(&reply);