Jump to content

xarly

Members
  • Posts

    150
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

xarly's Achievements

Advanced Member

Advanced Member (3/3)

0

Reputation

  1. Someone correct me if i'm wrong but when you call urand(1000, 5000) you are calling to MANGOS_DLL_SPEC uint32 urand(uint32 min, uint32 max);
  2. 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
  3. Nevermind... so easy as ObjectGuid receiver = ObjectGuid(receiver_guid);
  4. 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!!
  5. Will you work again in this project FragFrog? It was really promising!
  6. 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!
  7. News! I have installed debian 6, mysql 5.1, download sources and compile (thats all what i have done) ...but it's the same!! After 10-20 mins my client looks like freezed, i mean, i can move, but npc and commands are not responding, and server console works perfect. It's crazy, I give up... I go back to windows Thank you lillecarl
  8. 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!
  9. Why do you say that? I have recommend this way because I use it and works perfectly. But I do a correction: SD2Database.PExecute("INSERT INTO characters.
  10. This thread is quite old but i write for future lookups You can use a cheat something like this: SD2Database.query("INSERT INTO characters.table .... where characters is the name of your char db
  11. Really strange, isn't it? 8.( I will have to use windows while I find a solution... Thank you anyway
  12. 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
  13. Yeah I know But what i mean is that only one core is working, i think would be better if load is balanced between several cores, isn't it? 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