Jump to content

balrok

Members
  • Posts

    222
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by balrok

  1. btw the pacman developers used the same coding-style, if you try to run an old pacman version on a new computer, you cant even see your enemies, so fast is this game now ^^ and i looked at your code and i think that you got wrong with the miliseconds cause 6000 ms are just 6 seconds (1000ms are 1s) i wish you good luck, that you'll have succes
  2. you also don't need to have a full sha1 you just need as much signs of the sha1 as long it is unique also 3 characters may be unique in the whole git-repository
  3. 1. git reset --hard MUH MUH= sha1-hash =HEAD^ (last commit) =HEAD^^(commit before last) or maybe you're satisfied with "git checkout MUH" 2. no idea (:
  4. there is a branch merged_arena which is a av-arena branch but i don't know, if i maintain it any longer.. for merging conflicts (i left it out of my guide, cause i am not very familar with it) first you see conflicts after pulling arena over alterac: CONFLICT (content): Merge conflict in src/game/BattleGround.cpp CONFLICT (content): Merge conflict in src/game/Language.h CONFLICT (content): Merge conflict in src/game/Unit.cpp then you also can do "git status" (maybe with "git status | grep unmerged" and i use git mergetool for resolving those conflicts i get vimdiff, close yourfile.LOCAL window and with "d+o" i obtain stuff from remote (will be arenastuff) deleting "===" ">>>" and "<<<" things but merging those two patches is realy trivial, mostly you have to remove "=="-stuff cause both patches don't have much different code.. @theluda: i thought i leave the branches out of this guide, cause if someone don't know how branches work, i need to explain him everything, and if someone knows branching, he surely can do it by himself.. this guide is just something for those very new users, which should get a small idea how to do some cool things with less knowledge ^^
  5. i try to write a generic, simple, fast forward tutorial about how getting mangos and then getting my alterac branch, so that you can start with this spare knowledge to get other branches and also get used to git at first: i started with git somewhere in august, and don't know very much about it, so some things may be not so good - also this is only tested at linux (gentoo) also i don't explain the commands very much (mostly because the endless features^^) getting mangos: git clone giturl [targetdir] targetdir is optional, if not specified it will get downloaded to the directory "mangos" $ git clone git://github.com/mangos/mangos.git source updating mangos: git pull [giturl/alias [remote-branch]] the alias origin will be added if you cloned mangos with the above command, but in the next step i show you how to set up own aliasses (not very important, but i like them) remote-branch is the branch, in the internet, which you want to get, cause mangos currently only develops in master, you don't need any other branches $ cd source $ git pull origin master how to get another fork first thing, which make future stuff easier is: git remote add balrok [url]git://github.com/balrok/mangos.git[/url] ------- side note: at this point you should know how to handle local branches, it will make things much easier later ----- now you can get a branch with git pull balrok alterac to get a list of all branches from me, look at the github-webpage (notice, that some branches depend on another (for example generic_bg_queueid depends on arena and bonushonor on queueid) to update mangos and/or alterac you just run git pull origin master git pull balrok alterac when you don't like the alterac branch anymore, just run git reset --hard origin/master (i haven't used this command yet very often, so i hope, it will work like i expect it (: ) this will also delete any other non-"origin/master" branches conflicts: if you want to play around with them, you can get a conflict with git pull balrok alterac git pull balrok arena it's quite easy to resolve everything, just take the stuff, which is new in arena, and delete those ">>>>" "====" and "<<<<" things.. but i can't give you good hints about this part, cause i'm not very experienced with this and will maybe lead you to something wrong as i said before i'm quite new, but you can ask questions, or maybe give me some advices (i haven't searched yet, but it will be nice to have the alterac-branch in an own local branch with it's complete history (if this is possible))
  6. vim is a good choice for developing i love to use the tags feature (see http://vimdoc.sourceforge.net/htmldoc/usr_29.html ) and everytime you got a new trick with vim, developing is even faster (: in the time where i programmed with php i always used quanta.. its a kde-editor
  7. you also can apply svn-style patches oO git apply path/to/patch and if your patchfile looks like this: "Index Creature.cpp" you have to change the directory to mangos/src/game/ if the file looks like "Index: src/game/creature.cpp" you need to change directory to mangos/ at least with linux this works.. also at linux you can simply make patch -d . -p0 < path/to/patch
  8. hello, i hope somebody has already figured out some stuff, so i don't need to search for this. 1. i forked mangos, now i have the repo balrok/mangos with some branches in it, how can i update my master branch (this is original mangos) to the current masterbranch of mangos? 2. if i download mangos/mangos master and know a nice fork with some nice branches, how can i easily add them (i hope i can do it with git and not with adding some patches) edit: at least i found a page where i can look for my problems: http://github.com/guides/Home
  9. this was sample code, as you requested.. it doesn't work and also the way of implementation is just an example that it may work (but also not 100% sure)
  10. my patch only touches minlevel (maxlevel gets ignored, i see no reason why disabling a bg for lvl70 players or lvl70+..) the current problem is that the bg levelranges are only 10-19,20-29,30-39 and so on my patch makes it generic, so if minlevel is 10 it creates ranges 10-19,20-29.. if minlevel is 51 (alterac minlevel) it creates ranges 51-60,61-70 and if you make 15 it makes 15-24,25-34 if the thing you described is a bug please post it as private message, or create a thread in the bugforum
  11. and why not just disabling tbc in a current mangos?
  12. * What bug does the patch fix? What features does the patch add? it merged some forloops together * For which SubVersion revision was the patch created? 6599 * Is there a thread in the bug report section? 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. balrok because there were 3 forloops which all iterated the same, i merged them together patch http://mangos-files.eu/patches/?file=ab_merged_loops.patch
  13. my update http://mangos-files.eu/patches/?file=gen_queue_cleanup.patch the patch is now bigger, cause i cleaned up some other parts (changed name of variables and functions, so that they don't confuse anymore) i also changed the function bgqueue::removeplayer() to avoid already done calculation (to get queue_id) and that my getbgqueueidfromlevel fits better inside the problem from my last patch was that it sometimes (in the bgqueue:removeplayer function for example) failed to get the bg-minlevel cause the bg wasn't created yet
  14. helllo, i have an error in my code, i try to fix it
  15. * What bug does the patch fix? What features does the patch add? it makes getbattlegroundqueueidfromlevel generic, so it doesn't depend on static values (like before) it just looks for bg->minlevel and then calculates the bg-queueid with the players level * For which SubVersion revision was the patch created? 6505->now mangos-18.12 * Is there a thread in the bug report section? 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. balrok i've changed this function just a bit so this will work also for alterac and give users the possibilty to customize their battlegrounds more the only static thing is, the /10 in this function, maybe we add a field "levelstep" to bg_template.sql but current battlegrounds have all this levelstep/levelrange patch can be found here: http://github.com/balrok/mangos/commits/queue_id old one here: http://mangos-files.eu/patches/?file=generic_queueid.patch can be downloaded here: http://mangos-files.eu/patches/generic_queueid.patch ps:i haven't tested it yet, so please read the code or add it to a well populated server edit: updated to 6505 + added 2 asserts to this function
  16. it's ok, this is only needed for alterac valley so it will get included when it's needed
  17. * What bug does the patch fix? What features does the patch add? 1. make players lootable again in battlegrounds (fix in objectaccessor) 2.don't respawn corpse at graveyard when player is looting (fix in player.cpp (switched the order of repopatgrave and buildrepop) 3.added code in loothandler.cpp that corpselooting can be better implemented in future 4. cleaned up some code in player.cpp (corpse.gold=getlevel() will never be used as far as i see this) * For which SubVersion revision was the patch created? 6415 * Is there a thread in the bug report section? 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. balrok patch is here http://pastebin.com/m361605a7
  18. cause i often hear pre-increment is faster than postincrement, so i thought about a shellscript/regular expression to automaticly replace those on places where it's not important if there is a pre or postincrement cause i don't know how i can make multiple matches with find you also should execute it a 2nd time with "-name *.h" (and *.c) find all in for-loops: find -name *.cpp -exec sh -c "sed -r 's/(.*for *\\(.*; *)([a-zA-Z0-9_]+) ?((\\+\\+)|(\\-\\-))( *\\).*)/\\1 \\3\\2 \\6/' {} > /tmp/lalala && cp /tmp/lalala {}" \\; && rm /tmp/lalala find all in plain code: find -name *.cpp -exec sh -c "sed -r 's/^(( *)([a-zA-Z0-9_]*) *((\\+\\+)|(\\-\\-))+ *$/\\2\\4\\3;/g' {} > /tmp/lalala && cp /tmp/lalala {}" \\; && rm /tmp/lalala to find out if the script works right you can do: ack -h "for *\\(.*((\\+\\+)|(\\-\\-)) *\\)" > test and then run the sed-script over test sed -r 's/(.*for *\\(.*; *)([a-zA-Z0-9_]+) ?((\\+\\+)|(\\-\\-))( *\\).*)/\\1 \\3\\2 \\6/' test for the 2nd script it is: ack -h "^( *[a-zA-Z0-9_]+ *((\\+\\+)|(\\-\\-)) *+ *$" (if you don't have ack you can replace "ack -h" with grep , the result is the same (but grep is realy slow on the whole mangos-source, thats why i prefer ack) i post it in this section, cause i don't realy know if this will help and cause i'm not 100% sure if the server will work after this (i already tested the script with the for-loop without any crash.. but i can't test much things alone)
  19. you just have to remove the player from the other bg-queues he is in, when he joins a bg (maybe there is even a function like PlayerRemoveFromBGQueue ;-) ) i think it won't be to hard
  20. * What bug does the patch fix? What features does the patch add? without this patch, the raidgroup in bg gets disbanded when only one player is inside.. the battleground raidgroup should always exists when at least one player is inside * For which SubVersion revision was the patch created? 6186 * Is there a thread in the bug report section? If yes, please add a link to the thread. i don't found any * Who has been writing this patch? Please include either forum user names or email addresses. balrok Index: Group.cpp =================================================================== --- Group.cpp (revision 6186) +++ Group.cpp (working copy) @@ -207,7 +207,7 @@ uint32 Group::RemoveMember(const uint64 &guid, const uint8 &method) { // remove member and change leader (if need) only if strong more 2 members _before_ member remove - if(GetMembersCount() > 2) + if(GetMembersCount() > ((isBGGroup())?1:2)) { bool leaderChanged = _removeMember(guid);
  21. hello, i also searched this and found it in Player.cpp on line 6982 a (not nice looking) way to easily add loot is (in my opinion) from the " else if (IS_ITEM_GUID(guid))" and replace the guid in " Item *item = GetItemByGuid( guid );" with a database entry, you made for players i'm no good programmer, but maybe it will work
  22. patch is from me bugreport not found fix: it removes the flag at end of game, as expected Index: BattleGroundEY.cpp =================================================================== --- BattleGroundEY.cpp (revision 6166) +++ BattleGroundEY.cpp (working copy) @@ -571,8 +571,6 @@ void BattleGroundEY::EventPlayerDroppedFlag(Player *Source) { - if(GetStatus() != STATUS_IN_PROGRESS) - return; const char *message = ""; uint8 type = 0; cause this function gets called at end of bg, where "getstatus()" != status_in_progress, i removed this check..
×
×
  • 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