Giter Club home page Giter Club logo

Comments (14)

mackal avatar mackal commented on May 15, 2024

It looks like some packets use 16-bit ints and some use 32-bit ints

from server.

mackal avatar mackal commented on May 15, 2024

I think we just need to go through and switch all the remaining over to int32 now. I do highly recommend int32 over uint32 for this though.

from server.

Shendare avatar Shendare commented on May 15, 2024

But that limits us to 2 billion spells instead of 4 billion! How could we gimp ourselves so badly?

from server.

mackal avatar mackal commented on May 15, 2024

Not really, RoF2 can't use IDs larger than 45k.

from server.

Akkadius avatar Akkadius commented on May 15, 2024

Clients have hard coded caps

from server.

Shendare avatar Shendare commented on May 15, 2024

While I was -clearly- joking, to clarify on the recommendation for int32 instead of uint32, EQ treats SpellID as a signed number in some places, such as spell effects on items, which are -1 if there is no effect in that slot.

from server.

Akkadius avatar Akkadius commented on May 15, 2024

You weren't joking, you were bloody serious

On Sat, Nov 14, 2015 at 4:34 PM, Jon D. Jackson [email protected]
wrote:

While I was -clearly- joking, to clarify on the recommendation for int32
instead of uint32, EQ treats SpellID as a signed number in some places,
such as spell effects on items, which are -1 if there is no effect in that
slot.


Reply to this email directly or view it on GitHub
#7 (comment).

from server.

mackal avatar mackal commented on May 15, 2024

This shouldn't be closed. We still need to move spell IDs all over to a bigger sized int.

from server.

Akkadius avatar Akkadius commented on May 15, 2024

Then someone should change the datatypes quick cause it should be a fairly simple change and test so we can close this out

from server.

mackal avatar mackal commented on May 15, 2024

If it was so simple, it would be done already. I'm 99% sure I fixed one of the issues I ran into originally, but I just haven't revisted it yet.

from server.

Akkadius avatar Akkadius commented on May 15, 2024

Put your big boy pants on and git r dun

from server.

mackal avatar mackal commented on May 15, 2024

I looked into some more issues that might arise from fixing this. It looks like even though spell IDs were switched to ints at some point, the clients still used int16_t in the BeginCast_Struct. Luckily, these clients don't support spell IDs beyond the int16_t range, so we can just handle this in translators. (RoF+, at least for us use an int for this packet)

from server.

mackal avatar mackal commented on May 15, 2024

The CombatDamage_Struct as well as Action_Struct also still use int16_t for spell ID. We'll have to handle this in the translator as well.

Not sure what we should do since this packet has a more significant client side affect ...

from server.

SecretsOTheP avatar SecretsOTheP commented on May 15, 2024

The CombatDamage_Struct as well as Action_Struct also still use int16_t for spell ID. We'll have to handle this in the translator as well.

Not sure what we should do since this packet has a more significant client side affect ...

Was changed to int32 in ROF1.

Clients prior to ROF1 do not support that high of spell values anyway. In the encoder, they should simply be set to unknown spell ID. (-1, or SPELL_UNKNOWN macro - though, we should probably really have the SPELL_UNKNOWN macro reference the int32_t version and use the limits for each expansion)

In fact, I'd go as far as to say we can change the code in npc spells and other related places to int32_t once that is taken care of.

I have this functionality already (mostly) in classless, will have to port it over soon(ish) - the DB should already support int, though I will have to get PEQ and confirm.

References:

https://github.com/EQEmu/Server/blob/master/common/patches/uf_structs.h#L1263
https://github.com/EQEmu/Server/blob/master/common/patches/rof_structs.h#L1461

from server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.