Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //IN FUNCTION: UseFirstAidOnCritter(Critter& cr, Critter& targetCr, Item@ item)
- ...
- int curHp = targetCr.Stat[ST_CURRENT_HP];
- int maxHp = targetCr.Stat[ST_MAX_LIFE];
- if(curHp + heal > maxHp)
- heal = maxHp - curHp;
- targetCr.StatBase[ST_CURRENT_HP] += heal;
- // Start replacing the code from here: basically remove old floating text related.
- // Floating healing text.
- if (isCritFailure)
- FloatingHealText(targetCr, heal, HEAL_TEXT_REASON_FIRSTAID, SKILL_CHECK_FAILURE);
- else if (isCritSuccess)
- FloatingHealText(targetCr, heal, HEAL_TEXT_REASON_FIRSTAID, SKILL_CHECK_CRITICAL_SUCCESS);
- else
- FloatingHealText(targetCr, heal, HEAL_TEXT_REASON_FIRSTAID, SKILL_CHECK_SUCCESS);
- // Replace end, below this everything should be as the original source.
- // Message box texts.
- cr.Say(SAY_NETMSG, "Hit Points +" + heal);
- if(!is_self)
- targetCr.Say(SAY_NETMSG, "Hit Points +" + heal);
- _SetTimeout(cr, TO_SK_FIRST_AID, FIRST_AID_TIMEOUT(cr));
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement