Jump to content

Patman128

Members
  • Posts

    1090
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Patman128

  1. Patman128

    Separate string

    In case you or anyone else is still wondering about this, I have made another version with strchr to split the string. Here it is: m_AllowedMaps.clear(); const char* allowedMaps = sConfig.GetStringDefault("Allowed.Maps", "").c_str(); // if we actually have a string... if(strcmp(allowedMaps, "") != 0) { // next is a pointer to pos of next comma; prev is a pointer to last comma const char* next; // find first position of comma next = strchr(allowedMaps, ','); // no comma, insert only one entry if(!next) m_AllowedMaps.insert(atoi(allowedMaps)); else { // start at the beginning const char* prev = allowedMaps; // buffer for the argument char* buffer; // length of the fragment size_t length; // while we still have more while(next != NULL) { // how big the string fragment will be; factor in null terminator (+ 1) length = next - prev + 1; // allocate enough room in the buffer to hold the string fragment buffer = new char[length]; // copy the string fragment over strncpy(buffer, prev, length); // and don't forget the terminator buffer[length - 1] = '\\0'; // insert the new entry into our set of banned maps m_AllowedMaps.insert(atoi(buffer)); // set pos of last comma, + 1 char (i.e. the last comma) and get new pointer to next comma prev = next + sizeof(char); next = strchr(next + 1, ','); // deallocate buffer to prevent memory leaks delete buffer; } // once more for the last argument // we already have this pointer set so use it m_AllowedMaps.insert(atoi(prev)); } } In this case, it reads a string from the config and builds a set of map IDs (m_AllowedMaps is a std::set<uint32>) It has no problem with spacing, "0,530" and "0, 530" both work fine. I'm sure it could be easily made into a function.
  2. It's used for void Spell::EffectSummonObject(SpellEffectIndex eff_idx) for storing the GUIDs of objects summoned by spells.
  3. But what about the water! It's all pretty now!
  4. Patman128

    scripts

    We aren't your personal developers. Try doing it first and then ask specific questions about some specific problems. If you wanted to have them work on mangos, mangos would have to be modified a lot, because of some hooks which do not exist, like: void OnConfigLoad(bool /*reload*/) void OnStartup() etc. The reason they don't exist is because stuff like this should be implemented in the core. Scripts are only used for scripting specific objects.
  5. I think it would make much more sense to first: 1. Develop the proxy that connects clients to the different servers and the servers together. 2. Develop a server that supports individual maps and one that supports inter-server things (chat, guilds, etc) 3. Develop a server that specializes in battlegrounds. This seems like the logical course of action. You seem to want to do 3 first, when you could get more accomplished by starting generically and specializing it.
  6. Maybe he doesn't have a Symbian phone and doesn't want to buy another phone to develop one app for one person? I have an iPhone, but I wouldn't hold it to him to make an iPhone app. If I really wanted one I would just make it myself.
  7. What is rev 1300? Mangos revision 1300 was released Sat May 20 16:40:29 2006.
  8. Maybe a SOAP option as well?
  9. Patman128

    Gossip

    There is a reason you can't access them in scripts: these kinds of things should be done in the core. If you want to do something like get the number of players online in scripts for some reason, you need to write a wrapper function in a class scripts can access (like Player)
  10. You don't "set your IP", your IP is whatever your ISP gives you. It can change when you reset your internet connection, you can use something like dyndns.org to make one address for users to connect to (and don't forget to set realmlist to dyndns address if you use it)
  11. Note that if you do not want outside connection and only want connections on the same LAN, you can just use your local LAN IP for the realmlist in realmd DB and connect to that from the LAN computers. You shouldn't need to do port forwarding or use the external IP.
  12. There's a spell for it (http://www.wowhead.com/spell=34093) Or the more obvious: use the trainer.
  13. Which skills?
  14. Can you not read english? :huh:
  15. Any level 3 account works.
  16. This can be closed, as it's not a real bug report.
  17. http://github.com/mangos/mangos/tree/mangos-0.12 Checkout with: git clone git://github.com/mangos/mangos.git mangos-0.12 Mangos includes no scripts; use SD2 and ACID.
  18. If this fixed it, then it's likely that the problem is with DynamicObjects not applying their aura to players properly. I think it should be assumed that if the player is on the DynObj's list of affected players, they should have the aura, so this is definitely a hack fix and more work needs to be done to figure out why they don't have the aura.
  19. Just checkout UDB with svn co [url]https://unifieddb.svn.sourceforge.net/svnroot/unifieddb/trunk[/url] and then unzip/unrar/unwhatever UDB_0.12.0_mangos_9582_SD2_1639.zip. Do you know how to apply the update packs? If not, you'd better check @ UDB forums. Not that any of this is related to mangos...
  20. It should. Has nothing to do with the processor. If you use a lower O level, more debug data is put in. If you want to have better crash logs, use O2 or O1 or O0.
  21. native, and GCC will auto-detect the CPU type. Or amdfam10 or barcelona. http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options
  22. If you want to know how many FLOPS mangos uses, just run your own benchmarks. I don't think asking vladimir or some other developer to speculate on it is very desirable (not that vladimir is one for idle speculation anyway.)
  23. Go to the source folder and put in "git log -1".
×
×
  • 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