Jump to content

hunuza

Members
  • Posts

    133
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by hunuza

  1. Right now they are not saved anymore but calculated on login.

    What do you need them for? You should be able to calculate them yourself by base stats and equipped items + talents.

    If you need it for some external scripts, we might maybe save them independent from usual character save, like only on logout or so...

    Which do you need exactly?

  2. if you want to match the navmesh tiles to a map grid, then we'll need 4096 tiles, which means 2^11 bits for tileID.

    This leaves 2^11 bits for polyID, allowing 4096 polygons per tile.

    s = salt bit, t = tile bit, p = poly bit, spaces just make it easier to read/count (note: actual encoding might be different, I just am making an example)

    ssss ssss sstt tttt tttt tppp pppp pppp
    \\ 10 bits  /\\  11 bits   /\\  11 bits  /
                \\4096 tiles/  \\4096polys/
    

    It will be interesting to see if 4096 polygons is sufficient for all tiles.

    Maybe I got something wrong, but 2^11 = 2048 not 4096, so we would need 12 bits for tileId, which would leave us with 32-10-12=10 bits or 2^10=1024 polygons per tile.

  3. Of course, the application lends itself a lot better for factorization, but to stay with the example, I could think of at least four ways to refactor the spell system more (by class, type, effect, cause, etc) - would clear up some of those huge switches for example.

    If you have good suggestions how to refactor MaNGOS source why don't you simply make a patch and provide them to the community? If they really improve code quality, I am sure they will be accepted.

  4. I think understanding the spell system is at least partly independent of MaNGOS code. You should try to understand Spell.dbc structure first, then you can take a look at how we implement spell effects etc...

    The file names are pretty much self-explaining or? SpellAuras.cpp is related to Auras (again, to understand what Auras are you need to understand the spell system of WoW, not really MaNGOS code...). SpellEffects.cpp contains the spell effect implementations and the common functions (like targeting, casting etc) are implemented in Spell.cpp...

×
×
  • 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