From: Alyssa M. <fu...@us...> - 2013-01-14 10:13:26
|
gemrb: Infinity Engine emulator The branch master has been updated via 4dd5c7c0b8bd114837aa7a1be93d1c3a6c64859f (commit) Summary of changes: gemrb/docs/en/GUIScript/UnmemorizeSpell.txt | 9 +++++---- gemrb/plugins/GUIScript/GUIScript.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 6 deletions(-) from 80263ae62540bccf90f9c09773546076bf8ba757 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=4dd5c7c0b8bd114837aa7a1be93d1c3a6c64859f commit 4dd5c7c0b8bd114837aa7a1be93d1c3a6c64859f Author: Alyssa Milburn <fu...@fu...> Date: Mon Jan 14 11:12:03 2013 +0100 GUIScript: Fix non-iwd2 case of UnmemorizeSpell. diff --git a/gemrb/docs/en/GUIScript/UnmemorizeSpell.txt b/gemrb/docs/en/GUIScript/UnmemorizeSpell.txt index 8cb391c..adde6c8 100644 --- a/gemrb/docs/en/GUIScript/UnmemorizeSpell.txt +++ b/gemrb/docs/en/GUIScript/UnmemorizeSpell.txt @@ -4,10 +4,11 @@ Prototype: GemRB.UnmemorizeSpell(PartyID, SpellType, Level, Index) Description: Unmemorizes specified memorized spell. Parameters: -PartyID - the PC's position in the party -SpellType - 0 - priest, 1 - wizard, 2 - innate -Level - the memorized spell's level -Index - the memorized spell's index +PartyID - the PC's position in the party +SpellType - 0 - priest, 1 - wizard, 2 - innate +Level - the memorized spell's level +Index - the memorized spell's index +onlydepleted - remove only an already depleted spell with the same resref as the specified spell Return value: boolean, 1 on success diff --git a/gemrb/plugins/GUIScript/GUIScript.cpp b/gemrb/plugins/GUIScript/GUIScript.cpp index a775878..4864e08 100644 --- a/gemrb/plugins/GUIScript/GUIScript.cpp +++ b/gemrb/plugins/GUIScript/GUIScript.cpp @@ -7135,7 +7135,7 @@ static PyObject* GemRB_MemorizeSpell(PyObject * /*self*/, PyObject* args) PyDoc_STRVAR( GemRB_UnmemorizeSpell__doc, "UnmemorizeSpell(PartyID, SpellType, Level, Index[, onlydepleted])=>bool\n\n" "Unmemorizes specified known spell. Returns 1 on success.\n" -"If onlydepleted is set, it will remove only already depleted spells." ); +"If onlydepleted is set, it will only remove an already depleted spell (with the same resref as the provided spell)." ); static PyObject* GemRB_UnmemorizeSpell(PyObject * /*self*/, PyObject* args) { @@ -7151,7 +7151,10 @@ static PyObject* GemRB_UnmemorizeSpell(PyObject * /*self*/, PyObject* args) if (! ms) { return RuntimeError( "Spell not found!\n" ); } - return PyInt_FromLong(actor->spellbook.UnmemorizeSpell(ms->SpellResRef, false, onlydepleted)); + if (onlydepleted) + return PyInt_FromLong(actor->spellbook.UnmemorizeSpell(ms->SpellResRef, false, onlydepleted)); + else + return PyInt_FromLong(actor->spellbook.UnmemorizeSpell(ms)); } PyDoc_STRVAR( GemRB_GetSlotItem__doc, ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |