- Added code to the missile firing so that missiles that heal the target also work if they hit a PC.

- Added fields to the terrain class in preparation for new scenario format.
- Same with the party class, plus refactored it to use vectors and strings.
- Fixed a potential divide-by-zero error in get_ran.

git-svn-id: http://openexile.googlecode.com/svn/trunk@41 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
2009-04-28 13:00:21 +00:00
parent 9ed2738f6c
commit 049754ea27
16 changed files with 252 additions and 192 deletions

View File

@@ -627,29 +627,20 @@ void handle_talk_event(Point p)
SysBeep(20);
return;
}
for (j = 0; j < 120; j++)
if ((univ.party.talk_save[j].personality == store_personality) &&
(univ.party.talk_save[j].str1 == strnum1) &&
(univ.party.talk_save[j].str2 == strnum2)) {
ASB("This is already saved.");
print_buf();
return;
}
for (j = 0; j < 120; j++)
if (univ.party.talk_save[j].personality <= 0) {
give_help(57,0,0);
play_sound(0);
univ.party.talk_save[j].personality = store_personality;
univ.party.talk_save[j].town_num = (unsigned char) univ.town.num;
univ.party.talk_save[j].str1 = strnum1;
univ.party.talk_save[j].str2 = strnum2;
if(univ.party.has_talk_save(store_personality, strnum1, strnum2)){
ASB("This is already saved.");
print_buf();
return;
} else {
give_help(57,0,0);
play_sound(0);
bool success = univ.party.save_talk(store_personality,univ.town.num,strnum1,strnum2);
if(success){
ASB("Noted in journal.");
j = 200;
}
if (j < 200) {
SysBeep(20);
ASB("No more room in talking journal.");
}
} else {
ASB("No more room in talking journal.");
}
}
print_buf();
return;
break;