Comments (14)
It looks like some packets use 16-bit ints and some use 32-bit ints
from server.
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.
But that limits us to 2 billion spells instead of 4 billion! How could we gimp ourselves so badly?
from server.
Not really, RoF2 can't use IDs larger than 45k.
from server.
Clients have hard coded caps
from server.
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.
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.
This shouldn't be closed. We still need to move spell IDs all over to a bigger sized int.
from server.
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.
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.
Put your big boy pants on and git r dun
from server.
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.
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.
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)
- Designated initializer syntax causes compiler failure with Visual Studio 2017
- Tradeskill Recipe Inspect HOT 1
- [Help/Info Req.] Hi all - just some noob questions HOT 1
- Mobs drop aggro after 10minutes of combat and re-trigger event_combat(e) methods in scripts HOT 11
- [DB] Items table divergence HOT 1
- Finishing Blow is adding spellbonuses twice HOT 4
- Faction Inconsistencies with Live Client HOT 5
- Installation not working (solved) HOT 1
- Discrepancies in time HOT 6
- Items import needed HOT 7
- Fix for GroupLeaderName() returning wrong group leader. HOT 2
- zone_controller.pl EVENT_DEATH_ZONE sometimes not providing killed_entity_id HOT 1
- Console Output during database check delayed HOT 5
- Books in items structure isn't correct
- windows installer: Can't open new_server HOT 2
- Blocked Spells not working
- Using Encounters at a global level will cause random crashing when registering events.
- [CMake] Sodium vs SODIUM on Windows
- [CMake] Deprecation warnings on CMake versions < 3.5
- Database starting_items Table Incorrect Mapping HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from server.