Changeset 21 for trunk/src/hearthstone-world/QueryHandler.cpp
- Timestamp:
- 09/20/09 20:50:14 (3 years ago)
- Files:
-
- 1 modified
-
trunk/src/hearthstone-world/QueryHandler.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/hearthstone-world/QueryHandler.cpp
r19 r21 94 94 return; 95 95 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; 114 101 data << ci->info_str; //!!! this is a string in 2.3.0 Example: stormwind guard has : "Direction" 115 102 data << ci->Flags1; … … 162 149 return; 163 150 164 LocalizedGameObjectName * lgn = (language>0) ? sLocalizationMgr.GetLocalizedGameObjectName(entryID, language) : NULL;165 166 151 data << entryID; 167 152 data << goinfo->Type; 168 153 data << goinfo->DisplayID; 169 if(lgn) 170 data << lgn->Name; 171 else 172 data << goinfo->Name; 154 data << goinfo->Name; 173 155 174 156 data << uint8(0) << uint8(0) << uint8(0) << uint8(0) << uint8(0) << uint8(0); // new string in 1.12 … … 271 253 return; 272 254 273 LocalizedItemPage * lpi = (language>0) ? sLocalizationMgr.GetLocalizedItemPage(pageid,language):NULL;274 255 data.Clear(); 275 256 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); 280 258 281 259 data << page->next_page; … … 302 280 else 303 281 { 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; 309 283 } 310 284 SendPacket(&reply);