Skip to content
Browse files

pst: TNO did not get stripped on death

  • Loading branch information...
1 parent ad05199 commit f4007ecd2a5c878c3eeef4c8d1a3037145dbb930 @lynxlynxlynx lynxlynxlynx committed Dec 29, 2013
Showing with 9 additions and 1 deletion.
  1. +9 −1 gemrb/core/Scriptable/Actor.cpp
View
10 gemrb/core/Scriptable/Actor.cpp
@@ -4904,7 +4904,15 @@ bool Actor::CheckOnDeath()
if ((BaseStats[IE_SPELLDURATIONMODPRIEST]==1) && (LastDamageType & DAMAGE_MAGIC) && (GameDifficulty>DIFF_CORE) ) {
inventory.DestroyItem("", IE_INV_ITEM_DESTRUCTIBLE, (ieDword) ~0);
}
- DropItem("",0);
+ // ignore TNO, as he needs to keep his gear
+ Game *game = core->GetGame();
+ if (game->protagonist == PM_NO) {
+ if (GetScriptName() != game->GetPC(0, false)->GetScriptName()) {
+ DropItem("", 0);
+ }
+ } else {
+ DropItem("", 0);
+ }
//remove all effects that are not 'permanent after death' here
//permanent after death type is 9

0 comments on commit f4007ec

Please sign in to comment.
Something went wrong with that request. Please try again.