Skip to content

Commit

Permalink
Merge pull request #762 from dolio/fix/shield-mirror-image
Browse files Browse the repository at this point in the history
Fix crash from shield bash and mirror image
  • Loading branch information
doug1234 authored Feb 22, 2024
2 parents 05b8cba + 7e142f1 commit 9c8487d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion TemplePlus/condition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1825,8 +1825,10 @@ int ArmorCritMultiplier(DispatcherCallbackArgs args)
int ShieldBashProficiencyPenalty(DispatcherCallbackArgs args)
{
auto dispIo = dispatch.DispIoCheckIoType5(args.dispIO);
auto invIdx = args.GetCondArg(2);
auto attacker = dispIo->attackPacket.attacker;
if (!attacker) return 0;

auto invIdx = args.GetCondArg(2);
auto shield = inventory.GetItemAtInvIdx(attacker, invIdx);

if (dispIo->attackPacket.weaponUsed != shield) return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def mirror_image_attack_roll(d20a):

#Performer to Hit Bonus
to_hit = tpdp.EventObjAttack()
to_hit.attack_packet.attacker = performer
to_hit.dispatch(performer, OBJ_HANDLE_NULL, ET_OnToHitBonus2, EK_NONE)

to_hit_dice = dice_new("1d20")
Expand Down

0 comments on commit 9c8487d

Please sign in to comment.