Mirage Source
Spell Item fix - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Source Code Development (https://mirage-engine.uk/forums/forumdisplay.php?fid=51)
+----- Forum: Mirage Source 4 (Visual Basic 6) (https://mirage-engine.uk/forums/forumdisplay.php?fid=44)
+------ Forum: Bugs Reports (https://mirage-engine.uk/forums/forumdisplay.php?fid=9)
+------ Thread: Spell Item fix (/showthread.php?tid=2593)



Spell Item fix - Robin - 03-03-2009

This'll fix the error where it didn't read the player's class, or the item's class requirement properly.

Find:

Code:
If Spell(n).ClassReq - 1 = GetPlayerClas...

And delete the '-1'.

Then find:

Code:
Call PlayerMsg(Index, "This spell can only be learned by a " & GetClassName(Spell(n).ClassReq - 1) & ".", White)

And remove the '-1'.

Done and done.