From 24a78e5dc31025070e1f8fb74fd79925da93df15 Mon Sep 17 00:00:00 2001 From: Flugente Date: Mon, 14 Jul 2014 20:55:26 +0000 Subject: [PATCH] If is set on a blade, the blade weapon wil be replaced with th specified item when a person is hit with it. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7337 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Soldier Control.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index f3a97027..65aaf92d 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -5805,6 +5805,13 @@ void SOLDIERTYPE::EVENT_SoldierGotHit( UINT16 usWeaponIndex, INT16 sDamage, INT1 else sBreathLoss = APBPConstants[BP_GET_HIT]; ubReason = TAKE_DAMAGE_BLADE; + + // Flugente: check wether we can make this blade bloody + if ( ubAttackerID != NOBODY && MercPtrs[ubAttackerID]->inv[HANDPOS].exists( ) && Item[MercPtrs[ubAttackerID]->inv[HANDPOS].usItem].bloodieditem > 0 ) + { + // magic happens + MercPtrs[ubAttackerID]->inv[HANDPOS].usItem = Item[MercPtrs[ubAttackerID]->inv[HANDPOS].usItem].bloodieditem; + } } else if ( Item[usWeaponIndex].usItemClass & IC_PUNCH ) {