Jump to content

xarly

Members
  • Posts

    150
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by xarly

  1. Could you confirm that urand(0, 1) always give the same result while mangos is alive?

    /* Return a random number in the range min..max (inclusive). For reliable results, the difference * between max and min should be less than RAND32_MAX. */
    MANGOS_DLL_SPEC uint32 urand(uint32 min, uint32 max);
    

    I have tested this with scriptdev2, where urand is called always give the same answer in the same mangos life

    Maybe a seed is needed?

    Thank you

  2. I was using External SQL Mail patch, but after update i have a little problem with code because of this:

    Before:

    ...
    uint64 receiver_guid = fields[1].GetUInt64();
    ...
    
    Player *receiver = sObjectMgr.GetPlayer(receiver_guid);
    ...
    

    But now this throws error because GetPlayer needs a ObjectGuid variable

    I have been trying to fix it myself but i don't achieve to imagin how to "convert" uint64 to ObjectGuid

    Could you help me?

    Thank you!!

  3. i'm trying to fix a function i had working fine under windows, but in linux doesn't work

    int RandomNum() { 
    int chosen;
    chosen=int(1000*rand()/(RAND_MAX+1.0));
    return chosen; 
    }
    

    This function under windows (mangos compiled with vs2010) generates a random number between 0-1000, but under linux it returns always 0.

    I also have tried this modification with no luck:

    srand((unsigned)time(0));
    int RandomNum() { 
    int floor = 0, ceiling = 1000, range = (ceiling - floor);
    int chosen = floor + int((range * rand()) / (RAND_MAX + 1.0));
    return chosen;
    }
    

    I have tried several things but i don't achieve to get it working, could you help me?

    Thanks!

  4. This one thing. Ubuntu is not really the stable server os. It is pretty bleeding edge, i would consider using debian. Bt ubuntu should not drop connections, it might help to know what firewalls and what config you have on the machine

    - LilleCarl

    Thank you!, I will try with debian

    About firewalls and config in ubuntu, there was no firewall and iptables were empty, and config was by default. This is way i was going crazy...

    I will comment results, thank you!

  5. Hi!

    This question is not strictly about mangos but maybe you could help me with this.

    I have configured an ubuntu server to migrate from windows. I followed tutorials about download repo, compile it and install it, everything fine.

    Server runs smoothly, but the problem is that after some time playing, players loose connection, the server is running, it's just like server has closed connection with player, so you have to close the game and relogin.

    I have tested the same emu compiled for windows and same db in windows 2003 and players can play normally, so i suppouse it's ubuntu.

    This are Ubuntu specs:

    Core i7 950

    8GB RAM

    Disk SSD

    Ubuntu had no firewall while testing, iptables were empty and connection speed 100Mb

    Can you help me?

    Thank you

  6. Thank you for your huge work, but I think this will be a step back, at least for windows users. I'm having the first troubles with cmake and visual studio 10, some errors, output weird, compilation is slower (weird think i know, but it's true). We were used to using VS and was wonderful, I think I will have to restore win folder, and update it as I can

    Linux Outlaw 73 - If It Works, Don't Touch It

  7. I'm not really sure, but after apply tbb concurrent vector and sql sync patches, when a player open chests, this sometimes doesn't show loot and get bugged remaining opened, and cannot open it again, the player has to desconect and log again to try to view loot.

    As I say, this didn't happened before apply these patches :rolleyes:

    Any one can confirm this?

    Thank 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