comparison NPC.cpp @ 1653:d453ed393d6e

NPCGreetings
author Ritor1
date Wed, 18 Sep 2013 11:04:47 +0600
parents 5792fdafe2f5
children a7eebb6ee7a2 e1d1fe32c194
comparison
equal deleted inserted replaced
1652:42055a4bd550 1653:d453ed393d6e
478 } while ((decode_step<16)&&!break_loop); 478 } while ((decode_step<16)&&!break_loop);
479 } 479 }
480 uNumNewNPCs = 501; 480 uNumNewNPCs = 501;
481 pNPCGreetTXT_Raw = (char*)pEvents_LOD->LoadRaw("npcgreet.txt", 0); 481 pNPCGreetTXT_Raw = (char*)pEvents_LOD->LoadRaw("npcgreet.txt", 0);
482 strtok(pNPCGreetTXT_Raw, "\r"); 482 strtok(pNPCGreetTXT_Raw, "\r");
483 for (i=0; i<205; ++i) 483 for ( i = 1; i <= 205; ++i )
484 { 484 {
485 test_string = strtok(NULL, "\r") + 1; 485 test_string = strtok(NULL, "\r") + 1;
486 break_loop = false; 486 break_loop = false;
487 decode_step=0; 487 decode_step=0;
488 do 488 do
501 if (temp_str_len) 501 if (temp_str_len)
502 { //i+1 502 { //i+1
503 switch (decode_step) 503 switch (decode_step)
504 { 504 {
505 case 1: 505 case 1:
506 pNPCGreetings[i].pGreeting1 = RemoveQuotes(test_string); 506 pNPCGreetings[i].pGreeting[0] = RemoveQuotes(test_string);
507 break; 507 break;
508 case 2: 508 case 2:
509 pNPCGreetings[i].pGreeting2 = RemoveQuotes(test_string); 509 pNPCGreetings[i].pGreeting[1] = RemoveQuotes(test_string);
510 break; 510 break;
511 } 511 }
512 } 512 }
513 ++decode_step; 513 ++decode_step;
514 test_string=tmp_pos+1; 514 test_string=tmp_pos+1;