Jump to content

Loki_PhoenixWOW

Members
  • Posts

    7
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Loki_PhoenixWOW's Achievements

Newbie

Newbie (1/3)

0

Reputation

  1. Forgot to return *this; from an assignment operator Should be good now. src/shared/astd/bitset.h: http://github.com/Loki-PhoenixWOW/For-MaNGOS/blob/642f7bdf9abfd2315f3d0e2cf7c2be00d4dd534c/bitset.h src/game/SpellClassMask.h http://github.com/Loki-PhoenixWOW/For-MaNGOS/blob/642f7bdf9abfd2315f3d0e2cf7c2be00d4dd534c/SpellClassMask.h diff for implementation: http://github.com/Loki-PhoenixWOW/For-MaNGOS/blob/642f7bdf9abfd2315f3d0e2cf7c2be00d4dd534c/SpellCM.diff Someone want to tweak the diff so it can drop into your core? ~Loki
  2. Anyhow... here's everything updated with a fix for gcc x86_64. And by "fix" I mean I changed the bitset class to store in multiples of sizeof(char) instead of sizeof(long) src/game/SpellClassMask.h: http://github.com/Loki-PhoenixWOW/For-MaNGOS/blob/32bd762d7d4dec68df5d28f8a168a6796dac37eb/SpellClassMask.h src/shared/astd/bitset.h: http://github.com/Loki-PhoenixWOW/For-MaNGOS/blob/32bd762d7d4dec68df5d28f8a168a6796dac37eb/bitset.h diff for implementation (may need minor editting for drop-in compatibility): http://github.com/Loki-PhoenixWOW/For-MaNGOS/blob/32bd762d7d4dec68df5d28f8a168a6796dac37eb/SpellCM.diff Enjoy. ~Loki
  3. I would be happy to be just plain Loki, but it was taken =P I assumed a site link in the sig was ok because the guy who originally complained about it had one in his =P I'm not a dev for this site, I'm a dev for a server. We're just trying to be good open-sourcey people and give stuff back because we use your code. I fail to understand the logic of the problem. ~Loki
  4. Hmm this is failing hard on gcc x86_64... Seems the actual storage sizes for a bitset with gcc are all multiples of sizeof(long). I'll have to include a header for bitsets from something else. ~Loki
  5. Moved it to the signature, happy? ~Loki
  6. Hmm... doesn't fit... have to do it this way... src/game/SpellClassMask.h: http://github.com/Loki-PhoenixWOW/For-MaNGOS/blob/3f2fceaba3f510540b06e13579ed2c72fe3472dc/SpellClassMask.h SpellCM.diff: http://github.com/Loki-PhoenixWOW/For-MaNGOS/blob/3f2fceaba3f510540b06e13579ed2c72fe3472dc/SpellCM.diff Enjoy. ~Loki
  7. Hi, I'm a dev at a private server that's using a MaNGOS-based core now, and we've decided to submit some of our changes back to the community here, in the hope that they will be helpful. Not everything will be drop-in compatible, but most of it should be usable with only minimal editing. The first thing we'd like to give you guys is a sane way to deal with spell class/family masks. These are 96-bit sets of binary flags that help class spells decide which other spells to affect or be affected by. Currently they're stored alternately as an array of 3 uint32's or a uint64 and a uint32. Also, when they're used in code the flags are hard-coded, making the code hard to read and harder yet to update for new versions and debug. SpellClassMask.h contains the masks and flags enum'd out for every class, up to date for 3.1.x. These change very little from version to version FYI. It also contains a data type (SpellCM) that can be used as both a std::bitset<96> and an array of 3 uint32's. It uses std::bitset<96> as it's parent class, so all binary ops & << >> ~ etc should work on it as if it were a 96-bit number. See the class definition at the bottom for full details. SpellCM.diff is the patch that implemented it on our server. You should only need to change a few lines to make it useable. If you look through the file you should be easily able to tell how to use the SpellCM class. I don't seem to have permission to post attachments, so I guess I'll just paste them in here as replies ~Loki
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use