Mirage Source
Spell level req 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: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49)
+---- Thread: Spell level req fix (/showthread.php?tid=254)



Spell level req fix - Coke - 20-08-2006

Alright, so i was fiddling around with the basics and i noticed that the spell level requirement was not set by the 'level' req in the spell editor at all, it was infact taking the requirement from the vital mod (or appearing to do so anyhow)! Pfft!

Little bit of searching and it was an easy fix indeed. Server side:

Find:

Code:
Function GetSpellReqLevel(ByVal Index As Long, ByVal SpellNum As Long)
    GetSpellReqLevel = Spell(SpellNum).Data - Int(GetClassMAGI(GetPlayerClass(Index)) / 4)
End Function

and replace it with:

Code:
Function GetSpellReqLevel(ByVal Index As Long, ByVal SpellNum As Long)
    GetSpellReqLevel = Spell(SpellNum).LevelReq
End Function

Thats it fixed. Easy peasy Big Grin,

It shouldnt have any side effects at all, but please feel free to point out anything wrong with doing this. Seems to work perfectly to me but you never know!

Toodles~

Edit: Slightly optimized, hrhr


Re: Spell level req fix - Coke - 09-03-2008

Actually, this doesn't work. There is a bit more too it than this, You have to go and mess around with packets and things.. I'll update this when I get a minute.