If <BloodiedItem> 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
This commit is contained in:
Flugente
2014-07-14 20:55:26 +00:00
parent 696e9ccdff
commit 24a78e5dc3
+7
View File
@@ -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 )
{