Changeset 21 for trunk/src/hearthstone-world/QuestMgr.cpp
- Timestamp:
- 09/20/09 20:50:14 (3 years ago)
- Files:
-
- 1 modified
-
trunk/src/hearthstone-world/QuestMgr.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/hearthstone-world/QuestMgr.cpp
r19 r21 256 256 void QuestMgr::BuildOfferReward(WorldPacket *data, Quest* qst, Object* qst_giver, uint32 menutype, uint32 language, Player* plr) 257 257 { 258 LocalizedQuest * lq = (language>0) ? sLocalizationMgr.GetLocalizedQuest(qst->id,language):NULL;259 258 ItemPrototype * it; 260 259 data->SetOpcode(SMSG_QUESTGIVER_OFFER_REWARD); … … 262 261 *data << qst->id; 263 262 264 if(lq) 265 { 266 *data << lq->Title; 267 *data << lq->CompletionText; 268 } 269 else 270 { 271 *data << qst->title; 272 *data << qst->completiontext; 273 } 263 *data << qst->title; 264 *data << qst->completiontext; 274 265 275 266 //uint32 a = 0, b = 0, c = 1, d = 0, e = 1; … … 324 315 void QuestMgr::BuildQuestDetails(WorldPacket *data, Quest* qst, Object* qst_giver, uint32 menutype, uint32 language, Player* plr) 325 316 { 326 LocalizedQuest * lq = (language>0) ? sLocalizationMgr.GetLocalizedQuest(qst->id,language):NULL;327 317 std::map<uint32, uint8>::const_iterator itr; 328 318 … … 332 322 *data << uint64(0); // 3.0.2 unk 333 323 *data << qst->id; 334 if(lq) 335 { 336 *data << lq->Title; 337 *data << lq->Details; 338 *data << lq->Objectives; 339 } 340 else 341 { 342 *data << qst->title; 343 *data << qst->details; 344 *data << qst->objectives; 345 } 324 325 *data << qst->title; 326 *data << qst->details; 327 *data << qst->objectives; 346 328 347 329 *data << uint32(1); // Is Acceptable … … 403 385 void QuestMgr::BuildRequestItems(WorldPacket *data, Quest* qst, Object* qst_giver, uint32 status, uint32 language) 404 386 { 405 LocalizedQuest * lq = (language>0) ? sLocalizationMgr.GetLocalizedQuest(qst->id,language):NULL;406 387 ItemPrototype * it; 407 388 data->SetOpcode( SMSG_QUESTGIVER_REQUEST_ITEMS ); … … 410 391 *data << qst->id; 411 392 412 if(lq) 413 { 414 *data << lq->Title; 415 *data << ((lq->IncompleteText[0]) ? lq->IncompleteText : lq->Details); 416 } 417 else 418 { 419 *data << qst->title; 420 *data << (qst->incompletetext[0] ? qst->incompletetext : qst->details); 421 } 393 *data << qst->title; 394 *data << (qst->incompletetext[0] ? qst->incompletetext : qst->details); 422 395 423 396 *data << uint32(0); … … 538 511 { 539 512 tmp_map.insert(std::map<uint32,uint8>::value_type((*it)->qst->id, 1)); 540 LocalizedQuest * lq = (language>0) ? sLocalizationMgr.GetLocalizedQuest((*it)->qst->id,language):NULL;541 513 542 514 *data << (*it)->qst->id; … … 561 533 *data << status << uint32(0); 562 534 } 563 if(lq) 564 *data << lq->Title; 565 else 566 *data << (*it)->qst->title; 535 536 *data << (*it)->qst->title; 567 537 } 568 538 }