Mirage Source http://web.miragesource.net/forums/ |
|
Spell Levels http://web.miragesource.net/forums/viewtopic.php?f=210&t=1712 |
Page 1 of 1 |
Author: | Rezeyu [ Sun Apr 22, 2007 5:32 am ] |
Post subject: | Spell Levels |
Well, I was writing a small packet edit to the spells packets so that I could display some info in the client's lstSpell, and for 2 hours (Took a pizza break too) I couldn't get it to work, I tried a number of things, then I figured I should check at how Mirage loaded the LevelReq for spells, and then I noticed this: Code: Sub LoadSpells() Dim FileName As String Dim i As Long Call CheckSpells FileName = App.Path & "\data\spells.ini" For i = 1 To MAX_SPELLS Spell(i).Name = GetVar(FileName, "SPELL" & i, "Name") Spell(i).ClassReq = Val(GetVar(FileName, "SPELL" & i, "ClassReq")) Spell(i).Type = Val(GetVar(FileName, "SPELL" & i, "Type")) Spell(i).Data1 = Val(GetVar(FileName, "SPELL" & i, "Data1")) Spell(i).Data2 = Val(GetVar(FileName, "SPELL" & i, "Data2")) Spell(i).Data3 = Val(GetVar(FileName, "SPELL" & i, "Data3")) DoEvents Next i End Sub So yeah, It doesn't load said spells. then I scrolled up, and realized it doesn't save them either. So, I added this to Sub LoadSpells(): Code: Spell(i).LevelReq = Val(GetVar(FileName, "SPELL" & i, "LevelReq")) And this to Sub SaveSpell(ByVal SpellNum As Long): Code: Call PutVar(FileName, "SPELL" & SpellNum, "LevelReq", Trim(Spell(SpellNum).LevelReq))
And that -should- fix it.. I think. Unless I'm just retarded. |
Author: | Da Undead [ Sun Apr 22, 2007 1:45 pm ] |
Post subject: | |
I think this is right, good find |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |