Jump to content

Toinan67

Members
  • Posts

    389
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by Toinan67

  1. Movie should keep story from early part of game and first books:)

    Yes, a movie on all the great story we know would be awesome.

    But I think they should show a lot more than in War3 and WoW, maybe make a trilogy, one movie for each extension

    The problem is...we already know the overall story

    A whole new story would not be bad actually :D

  2. ...and that's what we have with the bag slots : an array who has a fixed size MAX_BAG_SIZE : no need to change the actual code.

    clear() calls the destructor of the element type. Elements here is Item* (pointer to Item), pointers do not have any real destructor, they only hold a memory address.

    So yes, you do leak the memory from all items if those were supposed to get deallocated here.

    I find it quite confusing. If I understood well, clear() does not do something like

    for (int i=0; i < myVector.size(); ++i)
       delete myVector[i];
    

    But just calls the destructor of myVector, so something like this (simplified):

    for (int i=0; i < myVector.size(); ++i)
       myVector[i]->~ElementType();
    

    I didn't know it was possible actually. Just found it on google, "C++ destructor explicit call"

    If I'm allowed to "defend" the vector :P : it does the "memset" part itself, which is good, right?

    Edit : and another question (sorry if I ask too much x) ) for uint8...why does MaNGOS uses it? Does it have any advantage?

  3. Do you test to change:

    #    MaxPlayerLevel
    #        Max level that can be reached by player for experience (in range from 1 to 100).
    #        Change not recommended
    #        Default: 80
    

    This does not work, maybe it's client-related problem?

    When you level up 81 for example, the packet is sent correctly, with the new amount of XP to level 82, but the xp bar still disappears.

  4. Thanks for your posts Lynx3d

    I realize I should have posted in core modifications

    Debatable if it's really worth it in this case, just adds additional indirections for marginal potential memory savings...and you still use MAX_BAG_SIZE in any case instead of actual bag size, so no win here.

    I've always been told to use vectors, maps, lists, etc in C++, because "it's better". Even when a simple array would be enough. Bad habit? When you don't need a lot from a vector, better to use simple arrays?

    For uint8 vs uint32, actually I was thinking as with a database (smallint better than int when you can for example). This "myth" comes from database for me. Thanks for the tip.

    And about documentation, it's a bit the same than vector, I've always been told not to hesitate adding "useless" documentation, because for some people it is not useless (particularly in an educational project)

  5. That's what I thought too, but see here : http://www.cplusplus.com/reference/stl/vector/clear/

    "All the elements of the vector are dropped: their destructors are called, and then they are removed from the vector container, leaving the container with a size of 0."

    Who's right? :S

    And if I am not mistaken, there is no need to check a pointer before delete.

    I don't know, maybe it is needed because "delete m_bagslot" calls the ~Bag function of the object. If the pointer is null, you'll have a crash when calling ~Bag.

    Am I right?

    • * What bug does the patch fix? What features does the patch add?
      Fixes nothing, adds some cleanup to the code itself
      -Remove redundant empty line
      -Code style cleanup
      -Remove useless includes
      -Use a vector for bag slots, instead of a simple array ("more" C++)
      -Use of uint8 instead of uint32
      -Add comments for each function
      Do not laugh if this patch is completely invalid. Please be aware that I'm not sure of myself at all, I'm here to get your comments (even if the patch is nearly nothing...)
      * For which repository revision was the patch created?
      10288+
      * Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.
      No
      * Who has been writing this patch? Please include either forum user names or email addresses.
      My fingers

    The patch -> http://paste2.org/p/936165

  6. In French :

    1 - Accueil

    2 - A propos

    3 - Contact

    4 - Mon compte

    5 - Aide

    6 - Connexion

    7 - Déconnexion

    8 - Inscription

    9 - Bonjour

    10 - Au revoir

    11 - Merci

    12 - Vous êtes connecté

    13 - Vous avez été déconnecté

    14 - Données invalides

    15 - Vote compte a été mis à jour

    16 - Votre compte a été banni/suspendu

    17 - Erreur lors du traitement de votre requête

    18 - Bienvenue = Welcome

    19 - Pseudo = Nickname

    20 - Mot de passe = Password

    21 - Royaume = Realm

    22 - no ideas ^^

  7. Tour De France is a must for me as I was an avid cyclist in my youth and find it astonishing how these guys can do what they do. I'd hazard a guess at 99% of all humans couldn't even do 3 stages.

    That's true, I'd even say that 100% of non-doped humans could not do 3 stages :D

    English football -> over OVER OVER paid for sure...

    Marathon is for crazy people.

  8. I didn't see anything for this. I think you'll need a core patch ^^

    Maybe in Pet.cpp :

    uint8 Pet::GetMaxTalentPointsForLevel(uint32 level)
    {
       uint8 points = (level >= 20) ? ((level - 16) / 4) : 0;
       // Mod points from owner SPELL_AURA_MOD_PET_TALENT_POINTS
       if (Unit *owner = GetOwner())
           points+=owner->GetTotalAuraModifier(SPELL_AURA_MOD_PET_TALENT_POINTS);
    -   return points;
    +   return uint8(points * sWorld.getConfig(CONFIG_FLOAT_RATE_PET_TALENT));
    }
    

    You need to add a few lines in World.cpp/World.h to make it work :)

  9. Just another discussion, about sports this time.

    Do you play any sport? Do you like watching sport on TV? Which team do you support? Which sportsmen do you admire the most?

    I've played basketball for something like 8 years, I stopped recently. I used to watch some matches on TV (NBA), but not that much.

    I try to follow the actuality in some others sports, soccer of course (even if my national team makes me want to stop...), handball (my national team is quite good at it :D), and recently I watched some "Tour de France" (quite boring after a while).

    Rugby is quite fun to watch, too.

    There are some sports I hate watching, such as baseball or american football. 10 min of vacuum, 30 sec of action. I really don't understand why some people are so passionnate about it (even if baseball is quite fun...when something happens).

    What about you? :)

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