Jump to content

fdb_

Members
  • Posts

    77
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by fdb_

  1. pdump seems broken since the commit that has made the data field external (now inside another table). Still have to check it deeper but afaik it is broken.
  2. fdb_

    Mutex locks

    voodoo should work too.
  3. Perhaps a kind of thread manager to act as a mutex keeper/watchdog to restart only the frozen thread.
  4. Note: Sometime you can face a linking error at the end of the compilation, it is often due to the existing mangos libs in the install dir. The solution is to move or delete the existing libs located in /home/user/server/lib. If this not the source of the issue, I have no clues.
  5. Hello, Here is a little cosmetic patch to set the default arena rating and the default arena personal rating inside the mangos.conf. diff --git a/src/game/ArenaTeam.cpp b/src/game/ArenaTeam.cpp index ed4ce5b..db5de09 100644 --- a/src/game/ArenaTeam.cpp +++ b/src/game/ArenaTeam.cpp @@ -36,10 +36,13 @@ ArenaTeam::ArenaTeam() m_stats.games_week = 0; m_stats.games_season = 0; m_stats.rank = 0; +/* if (sWorld.getConfig(CONFIG_UINT32_ARENA_SEASON_ID) >= 6) m_stats.rating = 0; else m_stats.rating = 1500; +*/ + m_stats.rating = sWorld.getConfig(CONFIG_UINT32_ARENA_STARTRATING); m_stats.wins_week = 0; m_stats.wins_season = 0; } @@ -136,10 +139,13 @@ bool ArenaTeam::AddMember(const uint64& PlayerGuid) newmember.wins_week = 0; if (sWorld.getConfig(CONFIG_UINT32_ARENA_SEASON_ID) >= 6) { +/* if (m_stats.rating < 1000) newmember.personal_rating = 0; else newmember.personal_rating = 1000; +*/ + newmember.personal_rating = sWorld.getConfig(CONFIG_UINT32_ARENA_STARTPERSONALRATING); } else { diff --git a/src/game/World.cpp b/src/game/World.cpp index b1605d5..c20924c 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -721,6 +721,8 @@ void World::LoadConfigSettings(bool reload) setConfig(CONFIG_BOOL_ARENA_QUEUE_ANNOUNCER_JOIN, "Arena.QueueAnnouncer.Join", false); setConfig(CONFIG_BOOL_ARENA_QUEUE_ANNOUNCER_EXIT, "Arena.QueueAnnouncer.Exit", false); setConfig(CONFIG_UINT32_ARENA_SEASON_ID, "Arena.ArenaSeason.ID", 1); + setConfig(CONFIG_UINT32_ARENA_STARTRATING, "Arena.StartRating", 1500); + setConfig(CONFIG_UINT32_ARENA_STARTPERSONALRATING, "Arena.StartPersonalRating", 1500); setConfig(CONFIG_BOOL_ARENA_SEASON_IN_PROGRESS, "Arena.ArenaSeason.InProgress", true); setConfig(CONFIG_BOOL_OFFHAND_CHECK_AT_TALENTS_RESET, "OffhandCheckAtTalentsReset", false); diff --git a/src/game/World.h b/src/game/World.h index 6711ff6..d28f168 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -173,6 +173,8 @@ enum eConfigUint32Values CONFIG_UINT32_TIMERBAR_BREATH_MAX, CONFIG_UINT32_TIMERBAR_FIRE_GMLEVEL, CONFIG_UINT32_TIMERBAR_FIRE_MAX, + CONFIG_UINT32_ARENA_STARTRATING, + CONFIG_UINT32_ARENA_STARTPERSONALRATING, CONFIG_UINT32_VALUE_COUNT }; diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index c52602b..2671542 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -1317,6 +1317,14 @@ BattleGround.PremadeGroupWaitForMatch = 1800000 # Default: 1 (active) # 0 (finished) # +# Arena.StartRating +# Default Rating at team creation +# Default: 1500 +# +# Arena.StartPersonalRating +# Default Personal Rating at team creation (Arena.ArenaSeason.ID should be >= 6 to use this parameter) +# Default: 1500 +# ################################################################################################################### Arena.MaxRatingDifference = 150 @@ -1327,6 +1335,8 @@ Arena.QueueAnnouncer.Join = 0 Arena.QueueAnnouncer.Exit = 0 Arena.ArenaSeason.ID = 1 Arena.ArenaSeason.InProgress = 1 +Arena.StartRating = 600 +Arena.StartPersonalRating = 600 ################################################################################################################### # NETWORK CONFIG Dunno if it can be included in git coz it is not very blizz like. Have fun.
  6. Here is a pretty huge back trace of a segfault: http://paste.ubuntu.com/389280/ The server has been compiled without any optimization and with maximum debugging options. Seems UnloadGrid and Instance involved in it. I am not able to reproduce it, and it happens randomly on few to high populated server. Any kind of feedback will be very appreciated. Mangos version: 9439 SD2: 1596 DB: YTDB 533
  7. Did you try to delete the existing libs installed by the mangos "make install" ? "rm /..../mangos/lib" then try to recompile and install again.
  8. I confirm. Perhaps due to the DB I do not know.
  9. All fixes related to the Waypoints and MovGens seem to reduce the number of crashes drastically. Good work guys!!! Here is another dump ( http://pastebin.mozilla.org/705378 ). I do not think it is linked to the Waypoint but there is a reference to TargetedMovementGeneratorMedium, so perhaps there is another missing check. By the way, it seems that the following patch fix the problem: diff --git a/src/game/CellImpl.h b/src/game/CellImpl.h index 2c8048d..67c5ae5 100644 --- a/src/game/CellImpl.h +++ b/src/game/CellImpl.h @@ -182,6 +182,10 @@ Cell::Visit(const CellPair &standing_cell, TypeContainerVisitor<T, CONTAINER> &v if(radius > 333.0f) radius = 333.0f; + // fdb avoid null ptr being processed + if (&obj == NULL) + return; + //lets calculate object coord offsets from cell borders. CellArea area = Cell::CalculateCellArea(obj, radius); //if radius fits inside standing cell Vladimir, do you think it is a good way to handle this kind of crashes ?
  10. yea, now i am suffering too : ( 10h uptime and bang started to crash every hour or less. Opcodes are variant so it is probably not fault of anything except packet hadling. Shared path to crash is World::Update() => World::UpdateSessions() => WorldSession::Update() and finishes at ByteBuffer.h Yes this issue is very annoying. I am facing many crashes related to this.
  11. Still one crash related to WaypointMoveGen, using cherrypicked 9461 http://pastebin.mozilla.org/705308
  12. The fix seems to work fine, but I still have some crashes with WaypointGen. Very few crashes I admit, one or two per day. Here is a sample of the backtrace: http://pastebin.mozilla.org/705126 Perhaps triggered inside an instance I dunno.
  13. You cannot run the server if you delete the libs. But if it is running, it should be safe to keep it running without the libs. But take care, in case of a crash, the server cannot be restarted because the libs will be missing. So it is better to move the full install path where you have all your server files and recreate /home/user/server/lib and compile and install. You can also configure and install in /home/user/server2 to avoid this problem. Etc...
  14. Try to remove the current libs located in the install dir of the server. mv ~/server ~/server_old mkdir -p ~/server/lib And restart the compilation from scratch. Sometime existing libs from an older mangos install can cause this problem, so you have to delete them. HowTo updated.
  15. This patch works for me: --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -2188,6 +2188,33 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx) m_caster->CastCustomSpell(m_caster, 45470, &bp, NULL, NULL, true); return; } + switch(m_spellInfo->Id) + { + // Death Grip + case 49560: + case 49576: + { + if (!unitTarget || !m_caster) + return; + + float x = m_caster->GetPositionX(); + float y = m_caster->GetPositionY(); + float z = m_caster->GetPositionZ()+1; + float orientation = unitTarget->GetOrientation(); + + m_caster->CastSpell(unitTarget,51399,true,NULL); + + if(unitTarget->GetTypeId() != TYPEID_PLAYER) + { + unitTarget->GetMap()->CreatureRelocation((Creature*)unitTarget,x,y,z,orientation); + ((Creature*)unitTarget)->SendMonsterMove(x, y, z, SPLINETYPE_NORMAL, SPLINEFLAG_UNKNOWN11, 1); + } + else + unitTarget->NearTeleportTo(x,y,z,orientation,false); + + return; + } + } break; } }
  16. How-to use custom ACE and TBB libs without screwing the one already installed on your system. >> Unix specific / Only tested on linux << Well many peeps have problems compiling MaNGOS with the last ACE or with an another version of TBB libs. They mostly use an hacky way to dupe the configure tool (homemade links in the /usr/lib etc...), in fact it works but it also screws the system libs and some errors can happen when you update your system. Moreover if some of the installed binaries need the old versions of the libs you can face some unwanted behaviour of the programs that require those libs. Here is a way to manage ACE and TBB localy without screwing your system neither modifying it. Requirements: * working with a non-privileged account (non-root) * pkg-config installed Notes: * This is not a cut & paste How-To First here is a brief description of the directories used in this guide. ~/src (main working sources directory, mangos and other libs) ~/opt (install dir for libs) ~/server (install dir of the mangos server) Go in ~/src directory and get all your sources code: git clone mangos... wget [url]http://..../ACE.tgz[/url] wget [url]http://..../tbb.tgz[/url] ACE Compilation/Installation: cd ~/src tar xfz ACE.tgz cd ACE_wrappers mkdir objdir && cd objdir ../configure --disable-ace-tests --disable-ace-examples --prefix=~/opt make make install At this time ACE libs are installed in your ~/opt/lib directory and ACE includes are located in ~/opt/includes The systems lib files stay untouched. Note: You can also use the same tip for the openssl libs TBB Compilation: cd ~/src tar xfz tbb.tgz cd tbb_directory make Now TBB is fully compiled inside 2 directories, one for the release and the other for the debug use. The TBB binaries are located in ~/src/tbb/build/linux_?????_release/ or ~/src/tbb/build/linux_?????_release/ Inside the build directories of TBB you can find the tbbvars.sh script, thanks god it will definitively help. Evironment settings: Edit your ~/.profile file with your fav editor and add these lines at the end: export PKG_CONFIG_PATH=$HOME/opt/lib/pkgconfig export LIBRARY_PATH=$HOME/opt/lib export LD_LIBRARY_PATH=$HOME/opt/lib export CPATH=$HOME/opt/include source $HOME/src/tbb/build/linux_????_release/tbbvars.sh Notes: - As it is not a cut & paste how-to you have to change the tbb paths. - Do not forget to logout and login again to activate these changes (or juste write this command "source ~/.profile") MaNGOS Compilation/Installation: cd ~/src/mangos autoreconf stuff scriptdev2 stuff mkdir objdir && cd objdir ../configure --prefix=/home/user/server --sysconfdir=/home/user/server/etc --enable-cli --enable-ra --datadir=/home/user/server/data --disable-builtin-ace make -jNBCORE Note: Sometime you can face a linking error at the end of the compilation, it is often due to the existing mangos libs in the install dir. The solution is to move or delete the existing libs located in /home/user/server/lib. Note: I had some problems during the installation, the make install target did not create the lib sub directory inside the install dir, the easiest way to avoid this issue is to manually create it. mkdir -p /home/user/server/lib && make install Now you should have your newly compiled MaNGOS with the local ACE and TBB libs. Note for those who use a restarter inside a screen, do not forget to source the .profile file or the mangos binaries will have some problems finding the local libs.
  17. Of course with the right config you can mitigate the impact. Perhaps you could give us some hints on the proper config so everyone can tune their servers to avoid some weird issues ?
  18. True, I was considering using an external libs being mandatory to ease the dev. By the way, both methods can be used (not at the same time of course). Your idea to use POX & REST is very good to produce small footprint and for the efficiency, but perhaps heavier than using a lib. I did not say neither mean restricting the WS to localhost, of course it can be bind to localhost if the realmd process runs on the same server as the webserver, but it is not limited to that behavior (in case you use multiple servers web/realm/world...).
  19. I understand this point of view. Regarding the additional libs, yes it is mandatory in that case. But I do not think it is a problem. such kind of heavy project usualy use many libs, one more wont hurt (at least it is what I think). I understand also that some investigations should be done on the cross-compatibility between the libs if needed. Regarding the security, it is not less important than the security included in the realmd but we have to consider that the web services are for admin tools and not called from the external network. For example, the admin can config the fw of his servers to only allow the WS being accessed from the webserver. Moreover the WS can be configured with user/pwd access, HTTPS, and can also use the server/client cert.pem file to fully authenticate each call.
  20. Arrai, yes using triggers is interesting and is also a good alternative. Can you tell us what do you think about the alternative using Web-Services to allow external auth ? (I am currently trying to make a PoC to expose some informations from the realmd tell me if you are interested in it).
  21. I agree that the config param is a good solution, but in that case there is no removal of the sha_pass field in the DB. Avoiding duplicate data is also one of the main aim and use of databases, so entirely removing the column could be a good enhancement to have a well formed DB.
  22. Here is another point of view regarding the issue about the sha pwd. Get rid of the sha pwd field and implement an additional feature in the realmd process. The additional feature would be a web service to let external apps to authenticate. The web service can be SOAP / XML-RPC or any other wide used technology. Config params can be: soap_srv = 0|1 soap_port = 8080 soap_user = mangos soap_pwd = sognam Using this or some similar ways to handle remote auth can be very interesting because of you can expose more than an authentication service but uptime / players ingame / account creation-deletion and many more... There are some nice libs to handle the job: - gSOAP http://gsoap2.sourceforge.net/ - XMLRPC-C http://xmlrpc-c.sourceforge.net/ Both are very stable, widely used, still maintained from years and portable. But gSOAP provides some tools to generate the code skeleton (read the "getting started" web page on their website), it could be perhaps easier to use it instead of XMLRPC-C.
  23. I advise everyone to take care about those kind of scripts. In fact those scripts have a tight link with the DB's and the connection to servers, I think that exposing the scripts to the public is a threat to your servers. Most of websites wont notice the impact but on some servers that host a huge amount of players the numbers of the requests made by the visitors can lead to a DoS. Moreover that can help some malicious peeps to take your server down flooding the stats pages. So the best solution is to use these scripts in some crontab task to populate the static stats web pages on your server. No more the impact on your servers on the web requests. Depending on the stats you can run (via crontab or any other schedulers) the task every 1min to 5mins (eg: 1min for the server status and 5mins for the population, etc.).
  24. Mangos: 8352 UDB Core compiled with -O0 ACE with -O2
×
×
  • 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