Jump to content

FragFrog

Members
  • Posts

    159
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by FragFrog

  1. Mangos Version: 9578, also in 9524-0.12 Custom Patches: none SD2 Version: 1639 Database Name and Version : UDB 0.11.6 How it SHOULD work: After Seed of Corruption procs on a target it should do 1332 to 1548 shadow damage on the target and nearby targets How it DOES work: Once it procs, shadow damage is inflicted on all units within range - including original caster and friendly party members. Quite a funny bug really: once a SoC procs on a target, it does damage to all units in range, not just enemies. This means if you stand to the target too close, you can die from your own SoC. Figured this might be due to some custom patches in our TBC core, but I have the problem too on a clean WotLK core so that's probably not it. If I'm any judge, I'd say some recent update in spell:checkTarget broke this, but can't seem to find any other bugreport about it. Anyhow, in certain locations (Hyjal waves for example) this skill is the biggest damage dealer in TBC, having it kill your tanks effectively renders it useless. Any patch / fix is welcome
  2. Just wondering, is anyone looking into this? User-based events don't seem to work here, 'create' button gets grayed out after hitting it once - and it's rather a neat feature to have I imagine
  3. Unfortunately I can't apply the patch here, using the TBC branch. Instance don't seem to appear to reset at all anymore, any suggestions?
  4. Most changes are no longer necesary it seems. Can't speak for the WotLK branch, but the TBC branch now runs by default pretty stable already, getting 2 ~ 3 days of uptime here with a core without stability patches, around ~250 users online. Unless someone has additional patches / hacks to increase stability I'd say that, at least for now, this topic is no longer necesary
  5. Mangos: 9524, 0.12 branch. SD2: 1632, 0.12 patch TBCDB: 0.2.2 I suspect ScriptDev2 caused this one, seeing as one of the last calls was for DoCastSpellIfCan. Any thoughts on the matter would be welcome Revision: * * 8569 9a1eb83a84cfb88e2abda7727e7195a3ebe74d17 Date 11:3:2010. Time 4:1 //===================================================== *** Hardware *** Processor: Intel(R) Core(TM)2 CPU E8400 @ 3.00GHz Number Of Processors: 2 Physical Memory: 4181744 KB (Available: 1256624 KB) Commit Charge Limit: 4194303 KB *** Operation System *** Microsoft Windows Server 2003 Standard Edition Service Pack 2 (Version 5.2, Build 3790) //===================================================== Exception code: C0000005 ACCESS_VIOLATION Fault address: 00401597 01:00000597 C:\\MaNGOS\\mangosd.exe Registers: EAX:00000097 EBX:B793DD00 ECX:00000000 EDX:00000000 ESI:00000000 EDI:00832E20 CS:EIP:001B:00401597 SS:ESP:0023:061AB72C EBP:061AC740 DS:0023 ES:0023 FS:003B GS:0000 Flags:00010286 Call stack: Address Frame Function SourceFile 00401597 00000000 ?GetFloatValue@Object@@QBEABMG@Z+27 0048E3A1 00000000 ?GetCombatDistance@Unit@@QBEMPBV1@@Z+21 00667FCE 00000000 ?CanCastSpell@CreatureAI@@UAE?AW4CanCastResult@@PAVUnit@@PBUSpellEntry@@_N@Z+16E 0066810F 00000000 ?DoCastSpellIfCan@CreatureAI@@QAE?AW4CanCastResult@@PAVUnit@@II_K@Z+DF 05C3059D 00000000 ?GetDisplayId@Unit@@QAEIXZ+1FDD 004AC793 00000000 ?Update@Creature@@UAEXI@Z+723 00686FE2 00000000 ??0?$GridReference@VGameObject@@@@QAE@XZ+2F52 004E751F 00000000 ?next@?$GridReference@V?$NGrid@$0BA@VPlayer@@U?$TypeList@VPlayer@@U?$TypeList@VCreature@@U?$TypeList@VCorpse@@VTypeNull@@@@@@@@U?$TypeList@VGameObject@@U?$TypeList@VCreature@@U?$TypeList@VDynamicObject@@U?$TypeList@VCorpse@@VTypeNull@@@@@@@@@@V?$SingleThreaded@VPlayer@@@MaNGOS@@@@@@QAEPAV1@XZ+C71F 004E74A2 00000000 ?next@?$GridReference@V?$NGrid@$0BA@VPlayer@@U?$TypeList@VPlayer@@U?$TypeList@VCreature@@U?$TypeList@VCorpse@@VTypeNull@@@@@@@@U?$TypeList@VGameObject@@U?$TypeList@VCreature@@U?$TypeList@VDynamicObject@@U?$TypeList@VCorpse@@VTypeNull@@@@@@@@@@V?$SingleThreaded@VPlayer@@@MaNGOS@@@@@@QAEPAV1@XZ+C6A2 004E6E70 00000000 ?next@?$GridReference@V?$NGrid@$0BA@VPlayer@@U?$TypeList@VPlayer@@U?$TypeList@VCreature@@U?$TypeList@VCorpse@@VTypeNull@@@@@@@@U?$TypeList@VGameObject@@U?$TypeList@VCreature@@U?$TypeList@VDynamicObject@@U?$TypeList@VCorpse@@VTypeNull@@@@@@@@@@V?$SingleThreaded@VPlayer@@@MaNGOS@@@@@@QAEPAV1@XZ+C070 004E6A23 00000000 ?next@?$GridReference@V?$NGrid@$0BA@VPlayer@@U?$TypeList@VPlayer@@U?$TypeList@VCreature@@U?$TypeList@VCorpse@@VTypeNull@@@@@@@@U?$TypeList@VGameObject@@U?$TypeList@VCreature@@U?$TypeList@VDynamicObject@@U?$TypeList@VCorpse@@VTypeNull@@@@@@@@@@V?$SingleThreaded@VPlayer@@@MaNGOS@@@@@@QAEPAV1@XZ+BC23 004E6530 00000000 ?next@?$GridReference@V?$NGrid@$0BA@VPlayer@@U?$TypeList@VPlayer@@U?$TypeList@VCreature@@U?$TypeList@VCorpse@@VTypeNull@@@@@@@@U?$TypeList@VGameObject@@U?$TypeList@VCreature@@U?$TypeList@VDynamicObject@@U?$TypeList@VCorpse@@VTypeNull@@@@@@@@@@V?$SingleThreaded@VPlayer@@@MaNGOS@@@@@@QAEPAV1@XZ+B730 004E3DFF 00000000 ?next@?$GridReference@V?$NGrid@$0BA@VPlayer@@U?$TypeList@VPlayer@@U?$TypeList@VCreature@@U?$TypeList@VCorpse@@VTypeNull@@@@@@@@U?$TypeList@VGameObject@@U?$TypeList@VCreature@@U?$TypeList@VDynamicObject@@U?$TypeList@VCorpse@@VTypeNull@@@@@@@@@@V?$SingleThreaded@VPlayer@@@MaNGOS@@@@@@QAEPAV1@XZ+8FFF 004DF1CD 00000000 ?next@?$GridReference@V?$NGrid@$0BA@VPlayer@@U?$TypeList@VPlayer@@U?$TypeList@VCreature@@U?$TypeList@VCorpse@@VTypeNull@@@@@@@@U?$TypeList@VGameObject@@U?$TypeList@VCreature@@U?$TypeList@VDynamicObject@@U?$TypeList@VCorpse@@VTypeNull@@@@@@@@@@V?$SingleThreaded@VPlayer@@@MaNGOS@@@@@@QAEPAV1@XZ+43CD 004D22AA 00000000 ?Update@Map@@UAEXABI@Z+32A 004D79A3 00000000 ?Update@InstanceMap@@UAEXABI@Z+13 007D559E 00000000 ?GetResetPosition@?$MovementGeneratorMedium@VCreature@@V?$RandomMovementGenerator@VCreature@@@@@@UAE_NAAVUnit@@AAM11@Z+E8DE 0064B6D8 00000000 ?GetEmotesTextStore@@YAPBV?$DBCStorage@UEmotesTextEntry@@@@XZ+29648 00606640 00000000 ??0CreatureEventAI@@QAE@ABV0@@Z+5230 00450D2E 00000000 ?getSource@?$Reference@V?$GridRefManager@VCorpse@@@@VCorpse@@@@QBEPAVCorpse@@XZ+3949E 00832E39 00000000 ?GetFloatDefault@Config@@QAEMPBDM@Z+F89 00291B84 00000000 ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74 78543433 00000000 _endthreadex+44 785434C7 00000000 _endthreadex+D8 77E6482F 00000000 GetModuleHandleA+DF Call stack: Address Frame Function SourceFile 7C82860C 00000000 KiFastSystemCallRet+0 7D1F5EDB 00000000 LookupPrivilegeValueW+114 7D1F5F82 00000000 LookupPrivilegeValueW+1BB 7D2477B7 00000000 StartServiceCtrlDispatcherA+93 0083240C 00000000 ?GetFloatDefault@Config@@QAEMPBDM@Z+55C 00429B0B 00000000 ?getSource@?$Reference@V?$GridRefManager@VCorpse@@@@VCorpse@@@@QBEPAVCorpse@@XZ+1227B 004516DD 00000000 ?at_exit@MaNGOS@@YAXP6AXXZ@Z+6AD 77E6F23B 00000000 ProcessIdToSessionId+209 Call stack: Address Frame Function SourceFile 7C82860C 00000000 KiFastSystemCallRet+0 77E61C8D 00000000 WaitForSingleObject+12 Call stack: Address Frame Function SourceFile 7C82860C 00000000 KiFastSystemCallRet+0 77E424FD 00000000 Sleep+F 00833050 00000000 ?GetFloatDefault@Config@@QAEMPBDM@Z+11A0 008391F0 00000000 ?step@barGoLink@@QAEXXZ+1E50 00832E39 00000000 ?GetFloatDefault@Config@@QAEMPBDM@Z+F89 00291B84 00000000 ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74 78543433 00000000 _endthreadex+44 785434C7 00000000 _endthreadex+D8 77E6482F 00000000 GetModuleHandleA+DF Call stack: Address Frame Function SourceFile 7C82860C 00000000 KiFastSystemCallRet+0 77E424FD 00000000 Sleep+F 00833050 00000000 ?GetFloatDefault@Config@@QAEMPBDM@Z+11A0 008391F0 00000000 ?step@barGoLink@@QAEXXZ+1E50 00832E39 00000000 ?GetFloatDefault@Config@@QAEMPBDM@Z+F89 00291B84 00000000 ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74 78543433 00000000 _endthreadex+44 785434C7 00000000 _endthreadex+D8 77E6482F 00000000 GetModuleHandleA+DF Call stack: Address Frame Function SourceFile 7C82860C 00000000 KiFastSystemCallRet+0 77E424FD 00000000 Sleep+F 00833050 00000000 ?GetFloatDefault@Config@@QAEMPBDM@Z+11A0 008391F0 00000000 ?step@barGoLink@@QAEXXZ+1E50 00832E39 00000000 ?GetFloatDefault@Config@@QAEMPBDM@Z+F89 00291B84 00000000 ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74 78543433 00000000 _endthreadex+44 785434C7 00000000 _endthreadex+D8 77E6482F 00000000 GetModuleHandleA+DF Call stack: Address Frame Function SourceFile 7C82860C 00000000 KiFastSystemCallRet+0 061AA784 00000000 0000:00000000 FF50D845 FFFFFFFF 0000:00000000 Call stack: Address Frame Function SourceFile 7C82860C 00000000 KiFastSystemCallRet+0 71B21A03 00000000 0001:00000A03 C:\\WINDOWS\\system32\\MSWSOCK.dll 71C0283C 00000000 select+A1 00255105 00000000 ?wait_for_multiple_events@?$ACE_Select_Reactor_T@V?$ACE_Reactor_Token_T@VACE_Token@@@@@@MAEHAAVACE_Select_Reactor_Handle_Set@@PAVACE_Time_Value@@@Z+115 FFFFFFFF FFFFFFFF 0000:00000000 Call stack: Address Frame Function SourceFile 7C82860C 00000000 KiFastSystemCallRet+0 71B21A03 00000000 0001:00000A03 C:\\WINDOWS\\system32\\MSWSOCK.dll 71C0283C 00000000 select+A1 00438F60 00000000 ?getSource@?$Reference@V?$GridRefManager@VCorpse@@@@VCorpse@@@@QBEPAVCorpse@@XZ+216D0 00439112 00000000 ?getSource@?$Reference@V?$GridRefManager@VCorpse@@@@VCorpse@@@@QBEPAVCorpse@@XZ+21882 00429E48 00000000 ?getSource@?$Reference@V?$GridRefManager@VCorpse@@@@VCorpse@@@@QBEPAVCorpse@@XZ+125B8 00832E39 00000000 ?GetFloatDefault@Config@@QAEMPBDM@Z+F89 00291B84 00000000 ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74 78543433 00000000 _endthreadex+44 785434C7 00000000 _endthreadex+D8 77E6482F 00000000 GetModuleHandleA+DF Call stack: Address Frame Function SourceFile 7C82860C 00000000 KiFastSystemCallRet+0 77E424FD 00000000 Sleep+F 00833050 00000000 ?GetFloatDefault@Config@@QAEMPBDM@Z+11A0 0042B44B 00000000 ?getSource@?$Reference@V?$GridRefManager@VCorpse@@@@VCorpse@@@@QBEPAVCorpse@@XZ+13BBB 00832E39 00000000 ?GetFloatDefault@Config@@QAEMPBDM@Z+F89 00291B84 00000000 ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74 78543433 00000000 _endthreadex+44 785434C7 00000000 _endthreadex+D8 77E6482F 00000000 GetModuleHandleA+DF
  6. To go over your questions in order: 1. Run a server. Easy as that really, once you compile Mangos it is a platform for clients to connect to on one hand and information about the world they connect to on the other hand. Without database content, clients will see an empty world (no creatures, no NPC's, no quests, etc), but it is a world they can walk around and use skills in. By hooking Mangos up to a fully stocked database you add content, by linking it up with a scripting engine like ScriptDev2 you ensure those mobs do more than just walk around and use random skills. 2. It reads information from the database. Again, this is either so obvious as to be entirely trivial or I'm missing the point of your question. If you mean who determines the database layout, it's Mangos - you will notice SQL updates in the GiT commits every now and again, these are almost always structure related (add a column, delete one, change a columns type, etc). Database structure and content are two fairly seperable things: you can have a very old content database and only apply all the SQL updates found in your mangos/sql/updates folder (from the point on where your content DB was from) and it will still more or less work. For the characters and realmd databases this is not even a point of concern: no content for those is required, so any updates you may find for those databases in for example UDB or SD2 SQL updates will be more or less copies of the updates released by Mangos. If you look at UDB releases for example you'll see a folder /udb/trunk/updates/0.11.6_additions which contains files like 387_corepatch_mangos_8994_to_9310.sql: this is nothing more than a single file with all the updates between 8994 and 9310 (found in mangos/sql/updates) thrown together. The actual UDB content updates can be found seperately in the file 387_updatepack_mangos.sql. 3. While ScriptDev2 handles quite a lot of scripting, most of it is simply put the ability for NPC's to interact in a non-general manner. Especially in raids and heroics, most bosses don't randomly toss out a few spells - they will also want to summon adds, have specific timers when they do cast spells, they'll shout out at specific points during the fight, etcetera. Almost all of that is handled by SD2 (and to a small degree by ACID). SD2 takes care of the waves summoned during Hyjal, it takes care of the doors in Zul'Aman opening once you kill the bosses, it handles Kalecgos transporting people to another realm in Sunwell Plateau, etc etc. In a way, it provides the intelligence behind creatures and objects. 4. Why on earth would the game (I assume you mean client here) contain AI scripting and world compilation? Your client does not control the creatures (ha, that'd be fun to see), and as far as the world itself is concerned, while the client does contain all the information on how things look like and how maps stick together, it has no data on where creatures are or what they can do or how quests work for example, nor does it allow you to connect to another player in the way Warcaft III for example does - it simply lacks that ability. As for the reason behind Mangos needing client DBC and map files: simply put, client data cannot be trusted, so when you want to blink for example the client will ask the server "hey, I want to blink from this spot to that spot, can I?" whereupon the server looks at the map and says "yeah sure, there aren't any walls in the way, go right ahead". Similarly, the server will need to know at what height it can spawn monsters, and where they can walk (it'd be a bit weird to see creatures randomly walk through mountains) - for these purposes (and probably more) the clients data files are needed by the server as well. Most of these are fairly trivial questions by the way - yes, you must learn somewhere, but that somewhere is the guides and tutorials you can find all over this forum as well as related fora.
  7. Because quite frankly, I don't know the code well enough - exactly because we're talking about thousand-line functions here could it very well be that parts rely on variable manipulations earlier on, the chance of breaking something is quite big unless you know exactly what you're doing - I'll be the first to admit that I don't. And even if this were not the case, the codebase is simply too large to make any real difference I fear - I'd be submitting patches for the next year or so, and I'm sure you have better things to do than going over them all the time. Not to mention the general impression I get from most active developers is that they're quite happy with the code as it is anyway
  8. I disagree - take a look at the sourcecode for ScriptDev2 for example. It's neatly organized, structured (in such a way that newbies can understand it) and anyone new to the project is still able to script bosses in a few hours without trouble. It is smaller than Mangos, true, but not 'small' as such - combine all the scripts and you still get a lot of code, yet they manage to make it easily accesable to newbies. Of course, the application lends itself a lot better for factorization, but to stay with the example, I could think of at least four ways to refactor the spell system more (by class, type, effect, cause, etc) - would clear up some of those huge switches for example. Or Spell:checkCast, another good one - there is an if loop of over a 150 lines just to handle the case where there is a target, another where there is no target, put those each in a seperate method and you've lowered the size of that method by a third. Which leads me to another point - a single method being over a thousand lines long? This really looks like a very typical example of code smell to me. Of course, I am no experienced C/C++ programmer - my professional area of expertise lies with PHP (which, if anything, has thaught me the importance of very closely guarding your sourcecode - making a steaming pile of spaghetti-code is incredibly easy in a weak-typed language) and to a smaller extend JAVA. It might well be that what looks like code smell to me is the normal accepted practice in C/C++, but it seems I am not the only newbie to the project to find the code largely incomprehensible, definitely at first glance On a sidenote: yes, I fully realise there are advantages to the current model. It is faster, requires less resources (to a certain extent anyway, depending on how well your compiler can optimize) and 'it works', more or less. Individual parts of the code seem well written to me, structured, and comments are pretty frequent. Only when you try to understand the big picture does it become troublesome, which might be in no small part due to the big picture being very, very big indeed
  9. FragFrog

    Death Bug

    *poke* Bug still persists it seems, at least on 0.12 branch, anyone got a more permanent solution?
  10. Not for one thing or another, but those classes are huge. Spells alone require ~ 17.000 lines of code. Imagine being new to a project and having that amount of sourcecode to sift through to find the problem with a spell (because sadly, it's not always clear whether a problem originates in a spell's aura, it's effect or the basic implementation - at least not when you're new to the project). I have said it before and I'll say it again: Mangos sourcecode in its current form is very hard to comprehend for new developers. I don't expect this to change anytime soon either, not unless some major refactoring takes place (which of course isn't going to happen). Just work with it a lot, hopefully after a while your patches will stop being rejected
  11. According to your post it was already bugged in 9316, so 9347 / 9323 are probably not responsible either //edit Well, I'll be buggered: reverting 9323 (for 0.12) fixes it indeed. Will try to find the exact cause later ^^
  12. Indeed, though keep in mind I'm still finetuning it a bit - not overly happy at the moment with the way the reply is parsed (pretty sure there is a way to use the xpath directly instead of grabbing the first childnode of the first childenode in the response body) and I think there's a few superflous calls in the way I create the original message. So far I only worked with SOAP in PHP, and those libraries are a lot more intuitive to use. //edit Polished it up a bit, still a few spots that might need changing but I think overall it should be a good starting point now
  13. I compared that to a version where the buff was working (8492 for example), and no changes. Maybe it's possible to fix it there, but it got broken somewhere else. My guess is SpellAura / SpellEffect, but those two are good for over twelfthousand lines of code and I really don't even know where to begin looking - still hoping a dev who does can fix it, it's bound to be some simple little thing
  14. That seems to fix it. Reset my local copy, added your patch, recompiled and now it works! Will try a clean + rebuild as well just to be sure, but that'll take half an hour or so, development server is a bit sluggish. //edit Jup, still works, if I'm any judge I'd say that fixed it, great! A simple soap interface class I just wrote now does in 40 lines what it took my socket connection class for the RA interface 200 lines, and that one was hell'a buggy..
  15. Won't compile, changed 'sleep' -> 'Sleep', will compile, but still no response. Changed duration from 2 to 100 and now I do get a response <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:MaNGOS" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns1:executeCommandResponse> <result> MaNGOS/0.12.1 (2010-02-28 14:34:42 Revision 8569 - a208fd2a8264b1142cac0249dc9be064955cc7c6) for Win32 (little-endian) Using script library: Default MaNGOS scripting library Using World DB: TBCDB 0.0.2.2 'I... am... UNLEASHED' for MaNGOS-0.12 076 with SD2 SQL for rev. 1478 Using creature EventAI: ACID 2.0.0 - Full Release for Mangos (2.4.3 Client) Online players: 0 (max: 0) Queued players: 0 (max: 0) Server uptime: 16 Second(s). </result> </ns1:executeCommandResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Using 32bit version of windows by the way.
  16. Thanks for checking it out! Using windows 2003 here as server, visual studio 2008 (so using the mangosdVC90 project file). If it helps, the response body I get back (for a server info command): <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:MaNGOS" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns1:executeCommandResponse> <result/> </ns1:executeCommandResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Looks allright, just completely empty in the response part Also tried doing a completely new checkout and clean + recompile earlier, but that did not fix it either
  17. You quite sure this works? I have the exact same problem now on the 0.12 branch which just got your patch included - both in my JAVA implementation as well as using the default PHP example file. I get the "Command succeeded" message just fine, but both the $result variable as well as $client -> __getLastResponse() are empty / null respectively. Tried both the default 'server info' as well as some other commands (like lookup item). Testing (of course) with the very latest 0.12 release as we speak. //edit If it helps, this is what my logs are showing: If I send an announce command, I do see the result ingame, so at least that part is working
  18. What features does the patch add? The ability to specify a custom name for the world service. For which repository revision was the patch created? 9429, 0.12 branch (but I think applicable for master as well?). Who has been writing this patch? I have, FragFrog I prefer installing Mangos as a service whenever possible - that way it can be automatically restarted and does not even require a logged in user to run, unlike using restarter programs etcetera. A limitation so far has been that you can only install one world servce (at least as far as I have been able to figure out) since service names must be unique. This patch allows users to (optionally) specify a custom service to be used when installing mangosd as a service, so you can install several realms as a service on the same machine. Usage: mangosd -s install -n customName or, for uninstalling, mangosd -s uninstall -n customName As said, custom name is optional: without using the -n modifier installing mangos as service works exactly the same as without this patch. Notes: - There is a 255 character limit for service names (hence the char array size). I have not added a check for this, I very much doubt anyone will ever create a service name this long. - Of course this is only applicable for running mangos on windows. - I considered adding a '--help' option to show usage information, as the service commands are a bit hard to figure out. Decided against it to keep the patch minmal, but might be worth considering. - I tried to stick to Mangos' coding style, but old habbits die hard, so there might be a few anomalies in there - Order of parameters is variable, so -s install -n name works, but -n name -s install works as well. From 8e6eff9878dfa727ed0a240a0a327473ba7b19ec Mon Sep 17 00:00:00 2001 From: FragFrog <[email protected]> Date: Sat, 27 Feb 2010 13:21:08 +0100 Subject: [PATCH] Allow custom service name --- src/mangosd/Main.cpp | 30 +++++++++++++++++------------- src/shared/ServiceWin32.cpp | 30 +++++++++++++++++++++++++++++- src/shared/ServiceWin32.h | 1 + 3 files changed, 47 insertions(+), 14 deletions(-) diff --git a/src/mangosd/Main.cpp b/src/mangosd/Main.cpp index 218fc5b..5bd8ded 100644 --- a/src/mangosd/Main.cpp +++ b/src/mangosd/Main.cpp @@ -34,8 +34,8 @@ #ifdef WIN32 #include "ServiceWin32.h" -char serviceName[] = "mangosd"; -char serviceLongName[] = "MaNGOS world service"; +char serviceName[235]; +char serviceLongName[255]; char serviceDescription[] = "Massive Network Game Object Server"; /* * -1 - not in service mode @@ -63,6 +63,7 @@ void usage(const char *prog) " --service run as service\\n\\r" " -s install install service\\n\\r" " -s uninstall uninstall service\\n\\r" + " -n name [Optional] specify service name\\n\\r" #endif ,prog); } @@ -77,12 +78,12 @@ extern int main(int argc, char **argv) ///- Command line parsing to get the configuration file name char const* cfg_file = _MANGOSD_CONFIG; - int c=1; - while( c < argc ) + int c = 1; + while (c < argc) { - if( strcmp(argv[c],"-c") == 0) + if (strcmp(argv[c], "-c") == 0) { - if( ++c >= argc ) + if (++c >= argc) { sLog.outError("Runtime-Error: -c option requires an input argument"); usage(argv[0]); @@ -92,7 +93,7 @@ extern int main(int argc, char **argv) cfg_file = argv[c]; } - if( strcmp(argv[c],"--version") == 0) + if (strcmp(argv[c], "--version") == 0) { printf("%s\\n", _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_NR,REVISION_ID)); return 0; @@ -102,23 +103,26 @@ extern int main(int argc, char **argv) //////////// //Services// //////////// - if( strcmp(argv[c],"-s") == 0) + if (strcmp(argv[c], "-s") == 0) { - if( ++c >= argc ) + if (++c >= argc) { sLog.outError("Runtime-Error: -s option requires an input argument"); usage(argv[0]); return 1; } - if( strcmp(argv[c],"install") == 0) + + WinServiceName(argc, argv); + + if (strcmp(argv[c], "install") == 0) { if (WinServiceInstall()) sLog.outString("Installing service"); return 1; } - else if( strcmp(argv[c],"uninstall") == 0) + else if (strcmp(argv[c],"uninstall") == 0) { - if(WinServiceUninstall()) + if (WinServiceUninstall()) sLog.outString("Uninstalling service"); return 1; } @@ -129,7 +133,7 @@ extern int main(int argc, char **argv) return 1; } } - if( strcmp(argv[c],"--service") == 0) + if (strcmp(argv[c], "--service") == 0) { WinServiceRun(); } diff --git a/src/shared/ServiceWin32.cpp b/src/shared/ServiceWin32.cpp index 843b6b0..245ab69 100644 --- a/src/shared/ServiceWin32.cpp +++ b/src/shared/ServiceWin32.cpp @@ -242,6 +242,7 @@ void WINAPI ServiceMain(DWORD argc, char *argv[]) } } + bool WinServiceRun() { SERVICE_TABLE_ENTRY serviceTable[] = @@ -257,4 +258,31 @@ bool WinServiceRun() } return true; } -#endif + +// Look for (optional) non-default service name. To install multiple mangosd +// services, a different name is required for each one. +void WinServiceName (int argc, char **argv) +{ + char defaultName[] = "mangosd"; + char defaultLongName[255] = "MaNGOS world service"; + + for (int c = 1; c < argc; c++) { + if (strcmp(argv[c], "-n") == 0) + { + if (++c > argc) + sLog.outError("Runtime-Error: -n option requires an input argument"); + else { + strcpy(serviceName, argv[c]); + strcat(defaultLongName, " "); + strcat(defaultLongName, serviceName); + strcpy(serviceLongName, defaultLongName); + sLog.outString("Using service name %s (Long: %s)", serviceName, serviceLongName); + return; + } + } + } + strcpy(serviceName, defaultName); + strcpy(serviceLongName, defaultLongName); +} + +#endif \\ No newline at end of file diff --git a/src/shared/ServiceWin32.h b/src/shared/ServiceWin32.h index 77e8226..45c3eb6 100644 --- a/src/shared/ServiceWin32.h +++ b/src/shared/ServiceWin32.h @@ -23,6 +23,7 @@ bool WinServiceInstall(); bool WinServiceUninstall(); bool WinServiceRun(); +void WinServiceName (int argc, char **argv); #endif // _WIN32_SERVICE_ #endif // WIN32 -- 1.6.1.9.g97c34
  19. Any update on this? It's a fairly important part of PvP, would really like a fix..
  20. In your database creature_template table you can set a mechanic immunity mask (info) which controls whether a creature can be interrupted, stunned, etc. Not entirely sure, but I assume this works for bosses as well. Keep in mind that most bosses are immune for a reason - if your raids whipe on them, it's most likely because you do not follow the correct tactics, not because the boss is unstunnable.
  21. Mangos Version: 9358, 0.12 branch. Also on 9429, 0.12 branch. Custom Patches: None related (have the problem on a clean core too). SD2 Version: 1573 Database Name and Version : TBCDB 0.2.2.2 How it SHOULD work: With the Shadow Weaving talent, shadow damage spells should have a 100% chance to increase the Shadow damage dealt by 2% for 15 sec. Stacks up to 5 times. How it DOES work: Shadow damage is not increased. Another one that broke with our core update: the shadow weaving talent, from what I've been told essential for shadow priests, does not proc - ever. Each shadow spell should cast a stacking buff that increases shadow damage dealt, but it's never cast. Seems there is a problem with spell procs - hearing similar reports about improved scorch and frostbite. My guess is a backport somewhere went wrong, would really appreciate anyone looking into this.
  22. Found the problem: it's the new part of if(non_caster_target) in Spell::CheckCast. I am guessing the problem is dat Kill Command (and a few other skills besides) have an implicit positive effect (such as give a buff to a friendly unit) while the target is negative - like an enemy. To fix this properly, this should be changed: if (IsExplicitPositiveTarget(m_spellInfo->EffectImplicitTargetA[k])) { if (!target_hostile_checked) { target_hostile_checked = true; target_hostile = m_caster->IsHostileTo( [EffectImplicitTarget] ); } In other words, the target_hostile check should not check for 'main' target, but for the target of the specific effect. I have no idea how to do this, perhaps a mangos dev can look into it? As a temporary hack you can disable the check alltogether: diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 45039fe..3231fc5 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -3464,7 +3464,7 @@ SpellCastResult Spell::CheckCast(bool strict) bool target_hostile_checked = false; bool target_friendly = false; bool target_friendly_checked = false; - for(int k = 0; k < 3; ++k) + /* for(int k = 0; k < 3; ++k) { if (IsExplicitPositiveTarget(m_spellInfo->EffectImplicitTargetA[k])) { @@ -3493,6 +3493,7 @@ SpellCastResult Spell::CheckCast(bool strict) explicit_target_mode = true; } } +*/ // TODO: this check can be applied and for player to prevent cheating when IsPositiveSpell will return always correct result. // check target for pet/charmed casts (not self targeted), self targeted cast used for area effects and etc if (!explicit_target_mode && m_caster->GetTypeId() == TYPEID_UNIT && m_caster->GetCharmerOrOwnerGUID()) -- 1.6.1.9.g97c34
  23. Confirmed in 9358, 0.12 branch. Thought it was database related
  24. Confirmed, backport of 9358. Used to work in 8719, hunters are bugging me like crazy. Any fix? //edit To elaborate: when you try to cast it normally it fails, which is correct. However, after you or your pet lands a critical, you are still unable to cast Kill Command. Not sure how this was / should be implemented, but it's a rather neat skill not to have anymore. The skill does light up (as if available), but when you cast you get an (Invalid Target) error.
  25. Mangos Version: 9358, 0.12 branch. Custom Patches: None related (have the problem on a clean core too). SD2 Version: 1573 Database Name and Version : TBCDB 0.2.2.2 How it SHOULD work: Ritual of Souls should require 1 shoul shard. How it DOES work: Ritual of Souls requires 2 soul shards. This bug has been around for a while now, and seems rather persistant. When summoning someone, warlocks are seen casting two different spells, and each one of them costs a soul shard - as a result, it's twice as expensive to summon people. The original spell is 698, which triggers 46546 - they seem very much identical, except that 46546 has a 30yd range and 698 has infinite range. Now in Spell::EffectTriggerRitualOfSummoning this is caused by calling CastSpell with triggered = false - if changed to true, the ritual only costs one soul shard (as expected, as this is a special case in Spell::CheckItems) and no longer shows two different casts as well, which would be a good fix, only then the ritual does not work anymore at all. I am guessing it broke around this commit, reverting that (and commenting out the last changed line) fixes it, but since I am not entirely sure why it was changed do I not know whether that would be a definite fix Since I could not find any other reports on the issue I am assuming it's TBC only, or people simply do not care. I would not either, except that soul shards don't stack and bringing along 50 of the buggers makes my bags full
×
×
  • 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