blkcrow Posted January 3, 2013 Author Share Posted January 3, 2013 This is a fix for a bug reported here [http://www.touchofde…em/#entry873441](http://www.touchofdeathforums.com/community/index.php?/topic/130858-spells-problem/#entry873441)In server at modServerTCP copy paste this sub```Sub SendSpellTo(ByVal index As Long, ByVal spellnum As Long)Dim buffer As clsBufferDim SpellSize As LongDim SpellData() As ByteSet buffer = New clsBufferSpellSize = LenB(Spell(spellnum))ReDim SpellData(SpellSize - 1)CopyMemory SpellData(0), ByVal VarPtr(Spell(spellnum)), SpellSizebuffer.WriteLong SSpellbuffer.WriteLong spellnumbuffer.WriteBytes SpellDataSendDataTo index, buffer.ToArray()Set buffer = NothingEnd Sub```in both client and server at modEnumerations above```' Make sure SMSG_COUNT is below everything else```add```SSpell```in server replace sub SendSpells with```Sub SendSpells(ByVal index As Long)Dim i As LongFor i = 1 To MAX_SPELLS If LenB(Trim$(Spell(i).Name)) > 0 Then Call SendSpellTo(index, i) End IfNextCall SendPlayerSpells(index)End Sub```in client at modHandleData in sub InitMessages add```HandleDataSub(SSpell) = GetAddress(AddressOf HandleSpell)```and at the bottom of modHandleData add```Private Sub HandleSpell(ByVal Index As Long, ByRef data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Dim spellnum As LongDim buffer As clsBufferDim SpellSize As LongDim SpellData() As Byte If Options.Debug = 1 Then On Error GoTo errorhandler Set buffer = New clsBuffer buffer.WriteBytes data() spellnum = buffer.ReadLong SpellSize = LenB(Spell(spellnum)) ReDim SpellData(SpellSize - 1) SpellData = buffer.ReadBytes(SpellSize) CopyMemory ByVal VarPtr(Spell(spellnum)), ByVal VarPtr(SpellData(0)), SpellSize Set buffer = Nothing Exit Suberrorhandler: HandleError "HandleSpell", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub```thats all Link to comment Share on other sites More sharing options...
abhi2011 Posted January 3, 2013 Share Posted January 3, 2013 Nice fix. Many ppl reported this.Liked Link to comment Share on other sites More sharing options...
teamokell Posted January 3, 2013 Share Posted January 3, 2013 Wow.I love this. Link to comment Share on other sites More sharing options...
hedgy Posted January 3, 2013 Share Posted January 3, 2013 Thank you so much!/hug Link to comment Share on other sites More sharing options...
tslusny Posted January 6, 2013 Share Posted January 6, 2013 Hmm but there is already sub SendUpdateSpellsTo, and this what you added is just same sub but renamed. I think this won´t fix anything. Link to comment Share on other sites More sharing options...
blkcrow Posted January 6, 2013 Author Share Posted January 6, 2013 > Hmm but there is already sub SendUpdateSpellsTo, and this what you added is just same sub but renamed. I think this won´t fix anything.this fixes everything. As i have explained in the topic i posted above every time the server updates a spell the client requests from the server all the spells the player has learned when the spells are more than 23 the server floods. What i have make is another sub that does the same thing but sends the spells the player has learned only once at the end Link to comment Share on other sites More sharing options...
Valentine90 Posted January 6, 2013 Share Posted January 6, 2013 This is a fix for _Eclipse Origins v2_? because I tested here and works perfectly in player not admin with 24 spells. Link to comment Share on other sites More sharing options...
blkcrow Posted January 6, 2013 Author Share Posted January 6, 2013 > This is a fix for _Eclipse Origins v2_? because I tested here and works perfectly in player not admin with 24 spells.its for 3.0 Link to comment Share on other sites More sharing options...
Valentine90 Posted January 7, 2013 Share Posted January 7, 2013 Better warn next time, which engine is being corrected, because I spent a lot of time here in creating 24 spells and testing Eo v2. Link to comment Share on other sites More sharing options...
hisherwin Posted January 10, 2013 Share Posted January 10, 2013 DUH i must read the Comment first before doing this Tutorial! Lol , good thing i got a backup. Link to comment Share on other sites More sharing options...
blkcrow Posted January 13, 2013 Author Share Posted January 13, 2013 this bug have been reported and fixed for the engines who use directX 8**BUT** there is no reason why this wouldnt happen in the directX 7 version of the engine.**DO NOT** use this fix if you arent experiencing this bug. To know for sure if this bug occurs in your version of the engine make 24 spells remove the admin rights from your character **log out and log in again** if you are unable to do anything (wraping, activating events, e.t.c.) exept for walking then and only then you should use this fix Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now