From: <ave...@us...> - 2007-12-31 19:33:58
|
Revision: 4965 http://gemrb.svn.sourceforge.net/gemrb/?rev=4965&view=rev Author: avenger_teambg Date: 2007-12-31 11:33:58 -0800 (Mon, 31 Dec 2007) Log Message: ----------- removed a bleeding hack :) Modified Paths: -------------- gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp Modified: gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp 2007-12-31 19:15:26 UTC (rev 4964) +++ gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp 2007-12-31 19:33:58 UTC (rev 4965) @@ -5441,6 +5441,19 @@ } } +int GetSpecialSpell(ieResRef resref) +{ + if (SpecialSpellsCount==-1) { + ReadSpecialSpells(); + } + for (int i=0;i<SpecialSpellsCount;i++) { + if (!strnicmp(resref, SpecialSpells[i].resref, sizeof(ieResRef))) { + return SpecialSpells[i].value; + } + } + return 0; +} + static void ReadUsedItems() { int i; @@ -7167,7 +7180,7 @@ SpellExtHeader *spell = SpellArray+i; // disable spells that should be cast from the inventory // Identify is misclassified and has Target 3 (Dead char) - if (spell->Target == 2 || spell->strref == 12040) { + if (GetSpecialSpell(spell->spellname) ) { btn->SetState(IE_GUI_BUTTON_DISABLED); btn->EnableBorder(1, IE_GUI_BUTTON_DISABLED); btn->SetEvent(IE_GUI_BUTTON_ON_PRESS,"UpdateActionsWindow"); //noop This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |