Skip to content

Commit

Permalink
Merge pull request #712 from GrognardsFromHell/bugfixes
Browse files Browse the repository at this point in the history
Bugfixes
  • Loading branch information
DudeMcDude authored Sep 30, 2022
2 parents 6c5d643 + c042bd4 commit 54039d8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 29 deletions.
9 changes: 6 additions & 3 deletions TemplePlus/ui/ui_item_creation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -962,9 +962,12 @@ void UiItemCreation::CraftScrollWandPotionSetItemSpellData(objHndl objHndItem, o
auto baseDescr = description.GetDescriptionString(obj->GetInt32(obj_f_description) );
auto spellName = spellSys.GetSpellName(mScribedScrollSpell);
int SPELL_ENUM_AID = 1;
auto aidSpellName = spellSys.GetSpellName(SPELL_ENUM_AID);
auto pos = std::strstr(baseDescr, aidSpellName);
auto endPos = pos + std::strlen(aidSpellName);
auto aidSpellName = std::string(spellSys.GetSpellName(SPELL_ENUM_AID));
auto pos = std::strstr(baseDescr, aidSpellName.c_str());
if (!pos) {
pos = std::strstr(baseDescr, tolower(aidSpellName).c_str());
}
auto endPos = pos + aidSpellName.size();
char newName[1024] = {0,};
auto idx = 0;
for (idx = 0; baseDescr + idx < pos; ++idx) {
Expand Down
2 changes: 1 addition & 1 deletion tpdatasrc/co8fixes/scr/py00011farmer wife.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ def run_off( attachee, triggerer ):
# attachee.ai_shitlist_remove( pc )
# attachee.reaction_set( pc, 50 )
attachee.runoff(attachee.location-3)
Timed_Destroy(obj, 5000)
Timed_Destroy(attachee, 5000)
return RUN_DEFAULT
2 changes: 1 addition & 1 deletion tpdatasrc/co8fixes/scr/py00040hedrack_allies.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def san_heartbeat( attachee, triggerer ):
game.global_vars[747] = 0
elif (attachee.name == 8076):
# hedrack ally mage 2
if (attachee.distance_to(game.party[0]) <= 100 or attachee.distance_to(game.party[1]) <= 100 or attachee.distance_to(game.party[2]) <= 100 or attachee.distance_to(game.party[3]) <= 100 or attachee.distance_to(game.party[4]) <= 100 or attachee.distance_to(game.party[5]) <= 100 or attachee.distance_to(game.party[6]) <= 100 or attachee.distance_to(game.party[7]) <= 100):
if any([attachee.distance_to(pc) <= 100 for pc in game.party]):
game.global_vars[748] = game.global_vars[748] + 1
if (attachee.leader_get() == OBJ_HANDLE_NULL):
if (game.global_vars[748] == 4):
Expand Down
27 changes: 3 additions & 24 deletions tpdatasrc/co8fixes/scr/py00323Nulb_village_woman.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,28 +76,7 @@ def stop_watch( attachee, triggerer ):
def all_dead():
if (game.global_vars[958] == 6):
game.global_vars[958] = 7
pc1 = game.party[0]
pc1.critter_kill_by_effect()
game.particles( "sp-Poison", pc1 )
pc2 = game.party[1]
pc2.critter_kill_by_effect()
game.particles( "sp-Poison", pc2 )
pc3 = game.party[2]
pc3.critter_kill_by_effect()
game.particles( "sp-Poison", pc3 )
pc4 = game.party[3]
pc4.critter_kill_by_effect()
game.particles( "sp-Poison", pc4 )
pc5 = game.party[4]
pc5.critter_kill_by_effect()
game.particles( "sp-Poison", pc5 )
pc6 = game.party[5]
pc6.critter_kill_by_effect()
game.particles( "sp-Poison", pc6 )
pc7 = game.party[6]
pc7.critter_kill_by_effect()
game.particles( "sp-Poison", pc7 )
pc8 = game.party[7]
pc8.critter_kill_by_effect()
game.particles( "sp-Poison", pc8 )
for pc in game.party:
pc.critter_kill_by_effect()
game.particles( "sp-Poison", pc )
return 1

0 comments on commit 54039d8

Please sign in to comment.