- Drug effects on first aid kits can be applied during bandaging

- Drug consumption opinion event, Larry personality change and increase of 'drugs taken' counter only occur if a drug if genuine drug effects were applied. As a result purely disease-causing items no longer cause these events.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8649 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2019-01-24 21:38:08 +00:00
parent 0ab562c29e
commit 253db89460
3 changed files with 35 additions and 22 deletions
+4
View File
@@ -13044,6 +13044,10 @@ void SOLDIERTYPE::EVENT_SoldierBeginFirstAid( INT32 sGridNo, UINT8 ubDirection )
// Flugente: additional dialogue
AdditionalTacticalCharacterDialogue_CallsLua( this, ADE_BANDAGE_PERFORM_BEGIN, pTSoldier->ubProfile );
AdditionalTacticalCharacterDialogue_CallsLua( pTSoldier, ADE_BANDAGE_RECEIVE_BEGIN, this->ubProfile );
// Flugente: if the medkit we use has drug effects set, apply them
// as a kit is used up over time, applying it several times would screw with chance effects, so just apply once
ApplyDrugs_New( pTSoldier, this->inv[HANDPOS].usItem, ( ( this->inv[HANDPOS] ) )[0]->data.objectStatus );
}
}