Jump to content

WIKI Activity

Showing articles posted in for the last 365 days.

This stream auto-updates     

  1. Earlier
  2. Updating your cloned Server / Database files

    Either run Easybuild / cmake again (Windows) or cmake / make (Linux)
  3. Linux firewalld setup

    In order to allow connections to your server under linux you need to add ports 3724/tcp and 8085/tcp to your firewall firewall-cmd --zone=public --permanent --add-port=3724/tcp firewall-cmd --zone=public --permanent --add-port=8085/tcp firewall-cmd --reload Please, anyone with permissions to write to closed topics, add this to the linux setup topic if possible. Thank you.
  4. ace Installing ACE on CentOS 7

    Building MaNGOS on Linux requires ACE libraries. I could not find information on installing those here, so I will make a short HOWTO (copied from ACE documentation) 1. Make a folder for ACE in your preferred location ( I use /opt) mkdir /opt/ace && cd /opt/ace 2. Download and unpack ACE wget http://download.dre.vanderbilt.edu/previous_versions/ACE-6.4.7.tar.gz tar -zvf ACE-6.4.7.tar.gz 3. Add needed environment variables cat >> /etc/profile <<EOF export ACE_ROOT=/opt/ace/ACE_wrappers EOF source /etc/profile 4. Add the desired headers cat > /opt/ace/ACE_wrappers/ace/config.h <<EOF #include "ace/config-linux.h" EOF cat > /opt/ace/ACE_wrappers/include/makeinclude/platform_macros.GNU <<EOF INSTALL_PREFIX = /usr/local include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU EOF 5. Build ACE cd /opt/ace/ACE_wrappers make make install 6. Add the library to the public path cat > /etc/ld.so.conf.d/ace.conf <<EOF /opt/ace/ACE_wrappers/lib EOF ldconfig -v
  5. Installing Mangos on Windows (using EasyBuild)

    It is kinda covered in the VS install guide (steps 3 & 4):
  6. Installing Mangos on Windows (using EasyBuild)

    I had huge trouble getting started at first. The EasyBuild and even the CMake of Visual Studio 2017 weren't able to build my solution, i got always the error that my C and CXX Compiler are not found. Exact messages: The C compiler identification is unknown The CXX compiler identification is unknown CMake Error at CMakeLists.txt:35 (project): No CMAKE_C_COMPILER could be found. CMake Error at CMakeLists.txt:35 (project): No CMAKE_CXX_COMPILER could be found. If you're running into the same problems and you aren't a highly expierenced C++/.NET developer here is the solution. When you're installing Visual Studio 2017 Community on a new system you need to install the desktopdevelopment kit c++ with it. Especially the Windows SDK needs to be installed right (you can do that within the install-wizard of visual studio). After doing that the error disappears and you can build your solution! I was missing that all the time and i spent 6 hours to figure that out.. Might be basic stuff for the most of you guys, but i just wanted to share my exp so far :-) So hopefully that little tip is helpful for future developer
  7. Thanks! Just a few minor notes: 1) do not forward port 3443 unless you exactly know what you're doing. This would be a server security break if the RA console were not disabled by default; 2) no need to change BindIP in the config file while it stays at the default value 0.0.0.0, which means, as usually, binding to every system IP found. If, perchance, you found it set to anything different (in particular, 127.0.0.1), then check the same setting in the realmd.conf file also; 3) no need to change default 127.0.0.1 value in the localAddress column of realmlist table, such change may prevent local client access to the server for some firewall settings.
  8. DISCLAIMER: You are making your server more available to the world by following these steps. Be aware that you might put your server at risk for cyber attack or compromise if you publish details about connecting to your server online. Before continuing, please consider taking steps to secure your server such as disabling remote root access to your shell and database, disable remote access for your mangos database user, change your router password to something strong, install any firmware updates for your router and any security updates available for your server. Unless you are comfortable with the risk and know how to protect yourself, be careful of who you share your server information with. OK! Now that's out of the way... These instructions are for setting up a dedicated hardware server on a home network. I didn't find clear concise instructions for setting it up for external connections so I'll share what worked for me. These instructions assume that your server is up and running with localhost or 127.0.0.1 in the BindIP conf fields and the address column of your server's realmlist entry in your realmd (by default) schema. Before we start... If your server is running, stop both server and realm executables by whatever your preferred method is. Server Conf Use the ip a command to determine your server's LAN IP address. Probably something like 192.168.1.xxx. In both your mangosd.conf and realmd.conf change the BindIP value to a string containing your server's LAN IP, like: BindIP = "192.168.1.19" # or whatever the IP address might be... Save and close both of those files. Determine Your Server's Public IP You will need your public IP address which you can find by googling "what is my public ip address". IMPORTANT: Make sure that you do this from the server itself. Jot that down. DB Now open MySQL Workbench or the MySQL shell or whatever your favorite means of SQL delivery. In the realmd schema (by default) in the realmlist table find the entry for your server. Update the address column to be your public IP address that you jotted down before and in the localAddress column, put your LAN IP address, like 192.168.1.xxx. Port Forwarding If you have a netgear router you will go to routerlogin.net. You need to login with your admin username and password. The username is probably admin unless you changed it. The password is either in your router's documentation (on a card or something), on a sticker on the router or it's something you changed it to. That's on you. If these next instructions don't work for you, you may need to poke around your router's proprietary UI to find the right options... Good luck! At the top choose the ADVANCED tab. On the left, choose Advanced Setup On the Advanced Setup submenu, choose Port Forwarding / Port Triggering You will need to create 3 forwarding rules. For each PortNumber of the ports 3443, 3724 and 8085: Click the +Add Custom Service button Fill in the service name with something, maybe "mangosX" In the External Starting Port field, put the PortNumber In the External Ending Port field, put the PortNumber In the Internal IP address field, put your server's LAN IP address, 192.168.1... (probably) Click the Apply button to save the rule Now you can start your server back up by your preferred method. There's just one more step and that's setting up our client's realmlist.wtf file. This is also the part you'll tell your friends when they want to connect. Over wherever your actual WoW client lives, find the realmlist.wtf file and change the IP to the external IP address that you just jotted down previously. In your realmlist.wtf file you should now have: set realmlist <whateverYourExternalIPAddressIs> set patchlist <whateverYourExternalIPAddressIs> You (or your friend) is now ready to start their client with Wow.exe and join your awesome cool publicly available server! Enjoy!
  9. db_scripts

    @bdebaere - Magnet DbDocs data has been amended to include the missing fields - the wiki will be updated when this is republished
  10. Extracting Game Data

    open a git shell console and this will work. You have chosen not to integrate git into the normal paths
  11. Extracting Game Data

    Worked fine in my Windows 10 box.
  12. Extracting Game Data

    Can u explain what u mean with change dir?
  13. Mangos Online Packet Editor (MOPE)

    Just realized that the project name is misguiding. If I understand correctly, this is an editor for documentation (description) of the packets, not for the packets itself. Also, you have no need to port C# code to Linux. There is the .NET port "mono", containing both the compilator and the execution medium for JIT binaries. I've executed the JIT binaries generated under Win by the VS for "any CPU", on a Linux system under mono with no issue.
  14. Mangos Online Packet Editor (MOPE)

    @Akar - I'm a windows dev by trade, so this was written in C# However, since 90% of the work is done via SQL, it might be able to be ported to Linux
  15. Mangos Online Packet Editor (MOPE)

    @antz was this written only for Windows or does it support Linux also?
  16. Since Mangos was first devised, the knowledge behind the packets sending information to and from the server has always been kept under wraps. - Anyone asking about information was normally told to 'go look in the code for details' I have long hated this so called cloak and dagger ideal as it harms the community greatly when people who have that information move on. I have therefore decided to create a Central Packet Knowledge System which covers all the versions of Wow. On that end I have set up a central Database, along with a small application to assist in populating this DB. The eventual goal is to extract all the relevant information back out and populate the Wiki with the information. The project is only in it's alpha stage, so any help testing or entering information would be greatly appreciated. Please contact @antz for a copy of the App plus log in credentials. This is main log in screen. A blank search is automatically done for you, the selected core is Classic by default. Click on a packet entry opens up the Edit Packet Screen This contains various information about the packet as well as the packet field definitions. Double-clicking on a field will open the field definition screen. This screen allows you to enter as much field information is you can, optionally you can also adjust which core this field is valid for (out of a maximum of the cores using this packet). This allows for different fields / field order based on the core it's used for. You can also use searches to filter the main list of packets.
  17. For many many years, the Localisation effort for MaNGOS has been almost non-existent outside of the actual core changes to allow localised text to appear. This caused the translation effort to be organised and managed by small groups outside of mangos and over time these projects lost interest and died. In late 2016 we decided to try and change that !! We created a dedicated Github Organisation and Repositories to hold all the localised data, including preparation and installation scripts. This organisation is located HERE Following on from this, @antz has created a tool 'Mangos Online Translation Editor' or MOTE which massively simplifies the translation effort: More information on MOTE can be found HERE If you can help us which translations into the following languages: Korean, French, German, Chinese, Taiwanese, Spanish, Spanish (South American), Russian and Italian We would love your help, as would the MaNGOs community !!
  18. What is MOTE ? Mangos Online Translation Editor or MOTE for short is a word based translation editor for MaNGOS, it aims to massive simplify the Adding / Editing of Translations for all the MaNGOS tables. Why is it MOTE different to other translation projects ? - It has been designed to be multi-core compatible, therefore sharing the translations of matching text between the cores. - By being word based, rather than entry based, the translation of a word needs only be done once and it becomes available anywhere the English word is used. - A simple user interface makes changing text very easy. The Initial login screen: (guest as the username and password will grant you read only access) The default main screen: Searching for bread* with German translations: Green means it has a translation, Red means is doesn't Clicking on an entry highlights it, and also updates the 'context bar' below the search results The 0123 shows which core it's for. in this example there are two entries, one which is present in all 4, and the other only present in M1,2,3 Double-clicking on an entry opens the translation edit screen: Double-clicking on an entry in the 'context bar' opens a screen to show how it's used: Clicking on either of the EDIT buttons will open the translation edit screen. If you would like to help contribute to the localisation effort, please contact @antz and he will provide you with the app and login credentials.
  19. For most Third Party utilities and Applications there is normally some sort of Account management functionality required. The way MaNGOS handles this is fairly simple and painless The account information is held in the account table of the realm Database The `sha_pass_hash` field is nothing else but the SHA1 hash of "USERNAME:PASSWORD", the upper-case username, a ":" and the upper-case password. As the password-field contains the username, you cant just change the username in the `account` table, you always have to change the password-hash too but don't worry, it sounds harder then it is - Luckily mysql provides all we need. Change password: SQL: UPDATE `account` SET `sha_pass_hash` = SHA1(CONCAT(UPPER(`usernameabc`),':',UPPER('passwordxyz'))), `v`='', `s`='' WHERE `id` = x; Where 'usernameabc' is the username, 'passwordxyz' is the password and 'x' is the account id of the existing entry. Change username: SQL: UPDATE `account` SET `username` = 'usernameabc', `sha_pass_hash` = SHA1(CONCAT(UPPER('usernameabc'),':',UPPER('passwordxyz'))), `v`='', `s`='' WHERE `id` = x; Where 'usernameabc' is the username, 'passwordxyz' is the password and 'x' is the account id of the existing entry. Create new account: SQL: INSERT INTO `account` (`username`,`sha_pass_hash`) VALUES ('usernameabc', SHA1(CONCAT(UPPER('usernameabc'),':',UPPER('passwordxyz')))); Where 'usernameabc' is the username, 'passwordxyz' is the password. Listing all characters belonging to an account: SQL: SELECT character0.characters.* FROM realmd.account LEFT JOIN character0.characters ON realmd.account.id = character0.characters.account WHERE username='player' Where character0 is your characters DB, realmd is your realm DB. player is the name of the account you want to find the characters for.
  20. Data types of packet fields

    The numeric data longer than 1 byte are represented in the big-endian form. The cores provide the conversion (if needed) by the ">>" and "<<" operators. Data formats Type Getting it in the core Description uint8, uint16, uint32, int8, int16, int32 Direct conversion of numbers and enum members to the corresponding type, like uint8(SPELL_FAILED_DONT_REPORT) Signed and unsigned versions are interchangeable if the representation is correct. Boolean true/false are represented usually as uint8(1), uint8(0) respectively. uint64 (GUID) Object::GetObjectGuid() A 8-bytes value, see class ObjectGuid. It is used for nothing but GUIDs, so uint64(0) in the code should be changed to ObjectGuid(). PackedGUID Object::GetPackGUID(), ObjectGuid::ReadAsPacked() A GUID in the packed form can be 2 to 9 bytes long. A brief description is presented below. C string string::c_str() A zero-terminated sequence of characters. Read/write operators for string type ("<< string" so on) provide this conversion, making call to c_str() optional. Raw data ByteBuffer::contents(), BigNumber::AsByteArray() An arbitrary sequence of bytes, following the uint8, uint16, or uint32 field which stores the length of the sequence. A packed GUID consists of a flag byte followed by the GUID data. This is based on the 1:1 mapping of a bit of the flag byte to the byte in 8-bytes GUID. The flag byte contains only those bits set which correspond to the non-zero bytes of the full GUID. The packed GUID length varies from 2 bytes (the best case for a player with low GUID under 256) and 9 bytes (with the flag byte 0xFF followed by the full GUID). The most saving in size provide player GUIDs since any other GUID contains non-zero data in the highest bytes, at least in the 12 highest bits (see ObjectGuid class for details).
  21. Adding Waypoints

    @Olion Thanks for the input, I will add them in
  22. Adding Waypoints

    GJ! I would like to add few remarks. All this is checked on Zero. ".wp show on" (this is the actual command to show the path) takes as an argument the (db) GUID of the mob, or else the mob must be selected ingame. The visual WPs are temporary summons and will cease in 5 minutes, so they're never added to the "world.creature" table. Nothing to worry about, ".wp show off" is optional. Subcommands "wp show first", "wp show last", "wp show info" can be useful too. Try "wp show info" with selected visual WP. Looking within the game at the first path as an example, SELECT * FROM creature_movement WHERE id=97 ORDER BY POINT ASC; we find it containing 3-5 times more WPs than is actually required for such a simple path. The necessary points are the ones with some actions defined (in this case, the first and the last ones having a wait time). Between these two ii is enough to have 2-3 other points. Remember that extra WPs add not only the server load, but also network traffic, so avoid it as much as possible. Please feel free to remove this comment when/if the most substantial parts of it will be incorporated in the main text.
  23. Adding Waypoints

    HOW TO CREATE WAYPOINTS - get things moving A short Introduction how a path is handled PREREQUISITES For every movement of a creature in the wow - world a definition has to be made. (Except the case a hungry one is looking at you for breakfast) The involved objects are: a db table called creature_movement, one with the little strange name db_script_string, one creature you want to teach a way and - last but not least you in the game with GM rights activated. A SQL interface to the database is also needed - equal which you prefer. The Information created in this process later can be <recycled> and used in scripts - eg some escorts type follower or the same way some boss scripts. In any case we recommend to finish the waypoints first and to deal with scripts later. BASICS - what do I need to know The route is stored in creature_movement in the following way : id = the guid of the mob and point = an autoincrement counter starting at 1. According to this waypoints always are just pointing to a single creature and - changing single waypoints later is a mess. Mostly the starting point of the route is the spawn poin. Leaving this way maybe possible but not effective. In all cases memorize the spawnpoint cause here your route starts. Also be aware of programming waypoints needs some time and maybe a lot of running work too.... STEP 1 - cleaning up First find your npc. You need the id and the guid of him. .go creature <guid> may be helpful. .npc info (target the npc first) gives the needed numbers. If youre replacing an old way perhaps save it now. Looking at the waypoints is simply done with SELECT * FROM creature_movement WHERE id = <guid> To erase former informations in the database you simply use DELETE FROM creature_movement WHERE id = <guid> Now your npc has no waypoints. STEP 2 - The running job Do the following : select your npc switch off his need to visit waypoints UPDATE `creature` SET `MovementType`=1 WHERE `guid`= <guid> LIMIT 1; select the npc then type .npc follow EXCURSION - server manners If that looks strange - lets look at the sense behind. When you visiting the wow world just a part of it is transferred to the client and also in the core just the parts are loaded where some player action occurs. The same way not used areas are taken out of memory on client and server side. You can imagine that a circle-like area around your character. When programming long ways you could get error messages cause some parts of your way are unloaded. Cause you have to select the npc to set his ways and if you are going too far away it is automatically deselected. OK now position yourself at the first spot and type with npc selected .wp add <guid> Congrats - The first waypoint has just been made. Between 2 waypoints the npc always takes a straight line - so to make realistic curves you have to do this by setting more waypoints to simulate it. Follow your path and set your waypoints - and dont forget less is more every waypoint is server workload so just make the neccesary. The npc is going through the waypoint list till the end. When hes at the end restarting again with the first waypoint. That means you must set the way more or less in a circle to return to starting point - else you will see a lost creature hopping through the fields searching for the first entry with odd behavior. Step 3 - Nothing without verification Switch on waypoints for your companion UPDATE `creature` SET `MovementType`=2 WHERE `guid`= <guid> LIMIT 1; if the mob is doing nothing try typing .reload all Now the creature should start moving and following your route. Watch one "round" to see if it all works correctly. Step 4 - EXTRAS - cream on top To make additional actions for your (now running) creature you have to access a single waypoint to tell him an action. If you look into your waypoints select * from creature_movement where id = <guid> You see the following data fields : 5 textid, emote, spell, waittime and a script_id. And a - empty - wpguid. EXCURSION - searching for guids To put something into a waypoint you have to identify it. That's not that easy when you made 30 or 40. Normally waypoints just exist in the database. To work with them visually, the first step is to spawn them - yes - spawn ! Normally a waypoint has no guid. .wp show <guid_of_your_npc> The core generates guids for every waypoint you use atm. To optionally control it - on the right side of table select * from creature_movement where id = <guid> Making long distance ways it can happen that not all wps are generated - then simply walk to the other part and use the command again. Now you're able to identify every single waypoint by his guid in the database. VERY IMPORTANT - clean up when your finished. Every spawned waypoint uses a guid - like you created a lot of mobs. When your finished type .wp show off - to delete the waypoint dummies STEP 5 - WAIT - for what ? is at it says ... just standing there around doing nothing simply set the wait time - be aware that this are milliseconds ... one minute = 60000 STEP 6 - TEXT - Adding Speech There are textid1 to textid5 to be used from 1 up. if more than one is used randomly one will be chosen. To make this far from easy - there is no text field. Its a reference into db_script_string. And to make it just more complicated entries must be between 2000000000 and 2000010000 !!! so you have to add your text into that table and afterwards you can tell the waypoints. just use content_default for your messages - the other fields are for translations into different languages STEP 7 - EMOTES - clapping npcs Simply store an emote number here reference you'll find in the dbc emote tables STEP 8 - SPELLS AND SCRIPTS This is going too far for a introduction. You may find Information about possible spells and scripting at other tutorials. ADDENDUM - THE MESSY THING To change a single waypoint entry is a challange. Ok - a position change can be easy done by .npc move When its spawned. But inserting a new point .. you first have to create that point. Than you must free the sequence number he should use - they are a unique key so no equals allowed in the database - by rising all upper waypoints one step up and after that you can give the new one the insertion number. Works with 5 waypoints but is a challange for a long route. The other way round - to swap the gps coordinates - is also not an easy task. So take care that the basic waypoints are all correct and working. In case of error often it will be faster to rebuild the path from scratch than playing around.
  24. Thanks! Even a bad standards are better than no ones, and these.. I must not say they are good, I just say I like it much. Note also the following: the standards are very close, if not identical, to ones used in the TrinityCore project and to ones set up by default in MS Visual Studio; this directly contradicts to the current C++ standards on the cores: So now I feel free to destroy those "full block {}" constructs I've argued against some time ago.
  25. A Foreword by Unkle Nuke In the interest of continuing to give structure to how we work here at MaNGOS, I have republished our Standards And Practices, with modifications and updates by me as necessary while preserving the instruction and intent of the original. Some parts were scrapped entirely and rewritten by me to be more informative and current with the progress of time and the MaNGOS sources. This document, in another form, was originally published on the old MaNGOS web site. I don't have a bibliography as to whom the original author or authors were, but I strongly suspect TheLuda's involvement, at least. If any of our current members had a hand in this document or know who did, please feel free to message me with the details so I may give credit where it is due. We are all here because we have stood on the shoulders of giants. While it's focus is primarily on server core development with C++, much of what is presented here can be useful for all MaNGOS developers. I now call upon those masters of database and scripting to step forward and offer any recommendations to this document, so it may be as complete as possible. If anyone notices errors or omissions, please message me with any necessary corrections. This is an ever-evolving document, in keeping with changes to how we work and the technology with which we do that work. Somebody may want to mirror this in our wiki, too... Chapter 1, Page 1 "So You Want To Be A MaNGOS Dev?" Introduction While we here at MaNGOS do our utmost to extend a helping hand to those in need, there is never enough precious time to do everything that needs to be done. You can help us with that by making your best effort to help yourself. When you can learn the basics before jumping into things, it allows us more time to answer the really hard questions about MaNGOS development. What follows is one avenue where you can teach yourself some valuable fundamentals in how to be a MaNGOS Developer. The rest, and everything that follows, is built upon what you will now read. This is the official document outlining all the basic methodology for existing and prospective developers. It offers recommendations for everything from correctly configuring and using your Git client, to proper coding style for core patches, to submitting and reviewing code. All developers and patch contributors are strongly encouraged to read and adhere to these guidelines Of course, you're free to do as you wish, but it would be nice if you could work with us on this, especially if you want to work with us! The first thing you do should be to configure a name and email. By default, Git chooses a name based on the GECOS data (which is probably right) and a default email based on your login and hostname (which is almost certainly wrong). Best practices dictate using your real name and email here, not any other aliases you may have, but you may wish to use something other than your real name and personal e-mail if privacy or legal reasons warrant it. These fields will be immortalized in the repository history so make sure you get them right and use the identity by which you wish fame and glory to be heaped upon you. $ git config --global user.name Your Name $ git config --global user.email [email][email protected][/email]ess While you’re configuring, you may want to enable coloring for some commands: $ git config --global color.diff auto $ git config --global color.status auto $ git config --global color.branch auto $ git config --global color.interactive auto If you prefer to use an editor other than the default Vi, such as emacs in the example, specify it like this: $ git config --global core.editor emacs Finally, to properly handle line feeds between Windows and Linux, Windows users can use the following setting: $ git config --global core.autocrlf auto DOES NOT WORK ON CURRENT VERSION OF msysGit. Checking if this is due to a bug or changes to Git's config. It is NOT recommended to set autocrlf to "true" as this forces converting CRLF into LF, which has been known to cause issues. Linux users can set Git to automatically fix CRLF that can sometimes sneak in when a Windows user makes a commit by converting them into standard LF when making a commit: $ git config --global core.autocrlf input It is highly recommended to use a single coding style for the whole project source code. Exceptions are allowed for independent libraries used in the project, but it is generally advisable all contributors to use the style specified here. Failure to adhere to these standards can result in your submitted work being rejected until it has been brought into compliance. Tab Length All tabs used in code editing consist of four blank spaces. If your editor allows configuration of the <Tab> key, please set it to use four spaces. Otherwise, do not use the <Tab> key! Instead, use the <Space> key and type in four blank spaces manually. Tab lengths other than four blank spaces are unacceptable. The Microsoft Visual Studio C++ code editor has tabs set to four spaces by default. Line Length (or Width) Please use 80-column width, or 80 characters, for line length. This includes spaces and punctuation. If your line is longer than that, please split it into two or more lines. If it's sometimes a little longer, by just a few characters, then it may be permitted at the discretion of the Code Reviewer. If you're splitting text inside brackets { }, the continuing text should be indented to the position after the opening bracket. printf ("This is a example of how we split lines longer than 80 characters\n" "into several so that they won't exceed this limit.\n", max_sourcecode_width); If you have long strings, you can split them as shown above, just remember that C/C++ compilers will glue together several strings that come without any special characters between them into a single string. Brackets When writing C++ code, brackets are placed symmetrically, with the ending bracket lined up to the opening bracket. if (something) { some function ...; } else { some function ...; } switch (x) { case 1: printf ("X is one!\n"); break; case 2: { printf ("X is two!\n"); break; } } Every bracketed block moves its contents by one tab to right. Labels (but not case selectors!) and public:/private:/protected: C++ keywords are placed at the leftmost indented position for the current block, that is, in the same position where enclosing brackets are. Also please don't use brackets around a single statement because it clutters the code; use brackets only when using non-obvious constructs, like: if (foo) { if (foo) some function ...; } else some function ...; Also, please place one space before opening parenthesis. Before, but not after: ( the if( blah ) style is a no-no! ) (the if (blah) style is correct!) Following these few and simple formatting styles with your work for MaNGOS will ensure it is readable and easily understood by every developer on the project. To ensure proper generation of annotated code, please use DoxyGen style comments. This is a bit similar to JavaDoc comments and other automatic code documentation generators. Single-line documentation or comments should be placed following three slashes. ///This is a single line. I only had a brief thing to say regarding some code. Documentation and comments that require more than one line should be enclosed in a comment block, which consists of a slash and two asterisks to show the start while the end is indicated by one asterisk and a slash /** ... ... */. All lines between the comment block markers begin with a single asterisk *. Here's an example that shows most useful keywords you can use in a comment block: /** * This function does something very useful. If used with care, this function * has the potential to make your programs really really useful. * * \arg \c x * The x argument specifies a integer that is transformed into something useful. * \arg \c y * This argument, if not NULL, is a pointer to a free memory area where this * function will put something really really useful. * \return * A useful value, or NULL if error. * * Here is a example that you can paste into your code so that it saves you a * lot of typing: * * \verbatim * for (int x = 0; x < 100; x++) * printf ("DoSomethingUseful%d = %s\n", i, * DoSomethingUseful (i, &ScratchPad)); * \endverbatim * * Paragraphs are split from each other by inserting a empty line. Also some HTML * tags are supported, like <ol> [<li>...] </ol> and <ul> [<li>...] </ul> for * ordered (numbered) and unordered (dotted) lists respectively. */ char *DoSomethingUseful (int x, void *y); /// This is a one-line comment void Something (); For comments and documenting not intended for printing by DoxyGen, use normal comment markers (// and /* ... */). These can be notes to yourself or remarks meant only as part of the work in progress. In addition, when you comment-out a line or more of code to prevent it from being used in the source when compiled, use two slashes ( // )at the beginning of each line of code. This is useful for having code as a placeholder until the full function has been completed, a bug remains unresolved elsewhere that breaks your code, or you wish to place debug routines that are not used for normal execution. Please remember to also add a note that the code has been disabled and the reasons for this. Use the standard outlined above for documentation and comments when doing so. void WorldSession::HandleSetSheathedOpcode( WorldPacket & recv_data ) /* * This should fix the problem with weapons still being seen as sheathed by * the client. Should make players happy to know they can now use their * weapons in combat! * Once this has been reviewed, I can do some proper documenting. */ { uint32 sheathed; recv_data >> sheathed; //Uncomment the following only when debugging the function. //DEBUG_LOG( "WORLD: Recvd CMSG_SETSHEATHED Message guidlow:%u value1:%u", GetPlayer()->GetGUIDLow(), sheathed ); if(sheathed >= MAX_SHEATH_STATE) { sLog.outError("Unknown sheath state %u ??",sheathed); return; } GetPlayer()->SetSheath(SheathState(sheathed)); } Remember, use DoxyGen style markers when you want your comments and documentation to be printed out. Use standard markers for comments and documents you do not want printed by DoxyGen, but need to make notes about the code for yourself and other devs. Afterword by Unkle Nuke Git can be a challenge, especially for those who have been brainwashed by other version control methods like CVS or Subversion. Honestly, Git isn't that hard, once you let go of old ideas and embrace the concept that code can exist in an ever-changing state which can then be frozen in a snapshot of time for your review. I was once like you, a lost soul, but I was brought into the light! Even as I was shown the way, let me guide you to the holy texts and free your minds, brothers! If you need an introduction to Git, check out these resources. They're all free!: Try Git lets you learn how Git works by using it in your web browser. No software installation needed! Git's documentation page is where you can find the Git Pro Book, the Git Manual, and some introductory videos. And that's just for starters! The Git Pro Book, is also free to download in PDF, EPUB, or mobi formats. The Git Manual is also included with the Git client, as man pages, plain text, or HTML, depending on which platform you are running Git. While you're there, don't forget to download the cheat sheets, for quick access to Git's most commonly used commands and workflow at a glance. Too much more to list here. Give the entire site a good long look. The Git Reference is an online manual, similar to the Git Manual, but it focuses on actually working with and setting up Git. Kernel.org also has a mirror of the Git Manual Git Immersion is an online training course that promises to teach you the fundamentals in a "learn by doing" style. If you don't already have Git installed, they provide links to the client version you will need as the first step. Git Reference has a similar title to the official Git Reference, but it is meant to be a quick reference for learning and remembering the most important and commonly used Git commands. As you work through each section, every page will also link to more in-depth Git documentation and provide you with an immersive experience that lets you go as deep as you want. Git Magic is an excellent online book that I highly recommend everyone have on their virtual bookshelf. It has a practical, hands-on approach that teaches you how to use Git by the way you should use Git. Also available in PDF, simplified HTML, and as packages for Debian and Ubuntu (Actually a compressed, lightwieght copy of the web site itself for offline browsing. Did I say it was good, or what?). Ry's Git Tutorial is mapped out by subjects, in order from beginner to advanced. This one has to be among the best there is for this type of tutorial. Each lesson covers using Git in an actual project, by working with example code and patches on your very own Git repository! If the all the other books, docs, and tutorials just seem too confusing, I'm sure Ry's Git Tutorial is the one for you! Github Help covers just about every possible question, topic, fact, subject, method, and everything else related to using Github. You definitely want to save this web page in your browser! That should have you working with Git like a seasoned hacker in a very short time! That gives us more opportunity to help with the MaNGOS-specific problems you may encounter.
  26. Extracting Game Data

    If you have Git installed, then you have the program able to execute Linux shell scripts. Start Git console, change directory (commands "cd" and "pwd" to check) to your client directory (where wow.exe file resides) and enter "./ExtractResources.sh" without quotes. But yes, this detail must be mentioned in the guide.
  1. Load more activity

Contact Us

To contact us click here
You can also email us at [email protected]

Privacy Policy | Terms & Conditions

Repositories

The Link to the master list
of MaNGOS repositories:
Copyright © getMaNGOS. All rights Reserved.

This website is in no way associated with or endorsed by Blizzard Entertainment®
×