Permalink
Browse files

IncrementGlobalOnce: Increase both variables, not just the second

 -fixes DUHIR.DLG uhir's lucky knife quest and hopefully many others
  • Loading branch information...
1 parent 1bbdb05 commit 188e98008dd066eb33c3d1625a4492e8b020e953 @chilvence chilvence committed Jan 9, 2014
Showing with 6 additions and 0 deletions.
  1. +6 −0 gemrb/core/GameScript/Actions.cpp
@@ -3308,6 +3308,12 @@ void GameScript::IncrementGlobalOnce(Scriptable* Sender, Action* parameters)
if (value != 0) {
return;
}
+ //todo:the actual behaviour of this opcode may need to be verified, as this is
+ //just a best guess at how the two parameters are changed, and could
+ //well be more complex; the original usage of this function is currently
+ //not well understood (relates to hardcoded alignment changes)
+ SetVariable( Sender, parameters->string0Parameter, parameters->int0Parameter );
+
value = CheckVariable( Sender, parameters->string1Parameter );
SetVariable( Sender, parameters->string1Parameter,
value + parameters->int0Parameter );

0 comments on commit 188e980

Please sign in to comment.