Jump to content

EMTEC_GM

Members
  • Posts

    14
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by EMTEC_GM

  1. A small change in wazzy bash, have combined with my loop because it is not always wanted to act.

    #!/bin/sh
    
    ###############
    # About: Auto restart mangos-worldd on crash & generate crash report into crash_log_(DATE_TIME).log
    ###############
    # 1. Compile MaNGOS with parameter: --with-debug-info
    # 2. Put auto_restarter.sh into compiled mangos directory (where folders: bin/, lib/, etc/)
    # 3. (Only once): chmod +x auto_restarter.sh
    # 4. Usage: ./auto_restarter.sh -c etc/mangosd.conf
    # p.s. Make sure you have "gdb" installed.
    ###############
    
    # config:
    # path to mangos-worldd binary
    daemon=./bin/bin/mangos-wotlk
    # system
    export LD_LIBRARY_PATH=.:lib:$LD_LIBRARY_PATH
    
    if [ "`ulimit -c`" -eq 0 ]; then
       ulimit -c unlimited
    fi
    
    
    while true
       do 
       MANGOS=`ps -el | grep mangos-wotlk`
       $daemon $*
       if [ -z "$MANGOS" ]; then
           dte=`date +%F_%H-%M-%S`
           gdb $daemon core.* --batch --eval-command="bt ful" > crash_log_$dte.log
           mv crash_log_$dte.log gdb/crash_log_$dte.log
           mv log/Server.log dc/Server-$dte.log
           gzip dc/*.log --best
           rm core.*
       fi
       sleep 5
    done

  2. Hi all.

    I wrote a patch for their needs. It involves monitoring the access to appropriate realm.

    If there is no entry in the database, your account may go into all the realms.

    If it is, the account can access only the specified realm.

    The first version of the patch:

    http://gist.github.com/228722

    + sql

    CREATE TABLE IF NOT EXISTS `account_access` (
     `acc_id` int(11) NOT NULL,
     `realm_id` int(11) NOT NULL,
     UNIQUE KEY `acc_id` (`acc_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    

    With more people online, Mysql or mangos fell.

    2009-11-07 12:16:37 ERROR:query ERROR: MySQL server has gone away
    2009-11-07 12:16:37 ERROR:WorldSocket::HandleAuthSession: Sent Auth Response (unknown account).
    2009-11-07 12:16:39 ERROR:SQL: SELECT id, gmlevel, sessionkey, last_ip, locked, v, s, expansion, mutetime, locale FROM account WHERE username = '******'
    2009-11-07 12:16:39 ERROR:query ERROR: MySQL server has gone away
    2009-11-07 12:16:39 ERROR:WorldSocket::HandleAuthSession: Sent Auth Response (unknown account).
    2009-11-07 12:16:57 ERROR:SQL: SELECT id, gmlevel, sessionkey, last_ip, locked, v, s, expansion, mutetime, locale FROM account WHERE username = '******'
    2009-11-07 12:16:57 ERROR:query ERROR: MySQL server has gone away 
    

    I created two versions of the patch

    http://gist.github.com/228723

    I do not know whether this is a reasonable solution, and that the second version is correct.

    I mean, that separate accounts have access only one realm.

    I have two realm:

    1. 3.1.3

    2. 3.2.2a PTR

    * Is a common database "realmd"

    I want to give some access to the accounts of the PTR expasion 2, but they can not go to 3.1.3

    If someone does not understand it sorry in advance.

    Thank you for your suggestions.

  3. git clone git://github.com/mangos/mangos.git [path]

    if chces some earlier rev, you must know that each has its own designation commit (commit)

    8676 - [8676] implemented dead-visible creature flags_extra

    commit 9c50d9e70314b0cd9eb0fe3bac8040d64a9965a5

    Git bash and enter

    git reset --hard 9c50d9e70314b0cd9eb0fe3bac8040d64a9965a5
  4. Hello. I would say that I am weak in C++. But I try to do something, to play with C++, and learn. I have a problem with the "flags" in mangos, but rather their understanding.

    data << uint32(0xbb8) << uint32(0x0);           // 7 gold
    data << uint32(0xbb9) << uint32(0x0);           // 8 green
    data << uint32(0xbba) << uint32(0x0);           // 9 show

    uint32(0xbba)

    What do they mean?.

    I think that it is all about communication with the client game, if not please correct me.

    How to read such data, and records. If anyone has the address of the guide in this section, C++.

    Thanks in advance for all help given.

  5. Vladimir further optimized by removing all the rules. For which he thanks.

    As for the scripts of statistics:

    When someone is offline - active_realm_id column is zero (active_realm_id = 0),

    When someone is online - active_realm_id column is greater than zero (active_realm_id> 0).

    For those who do not understand what the error was. Look at the situations that you have two worlds (2 Realms).

    You have included one world and it is, for example, 400 people, then you have the desire to attach a second world,

    So first mangosd online status changed to zero for all accounts that have the form of two worlds.

    So the statistics are based on online and so were wrong.

    People who write scripts for statistics, I've seen different things. But if you generate a number of online accounts at

    data base of the world through characters, this is not some circumspection. Since the base realmd (~ 50mb), and base characters (2GB) --

    So is the difference in the size of databases, and optimization. you can easily do yourself

    list of accounts that are currently in the game on a given realm.

    For example, how to do this in PHP (the idea).

    //             0      1        2           3        4
    $sql = "SELECT rl.id, rl.name, rl.address, rl.port, (SELECT COUNT(*) FROM account acc WHERE acc.active_realm_id=rl.id) FROM realmlist rl ORDER BY name DESC"
    $query = mysql_query($sql);
    
    while($row = mysql_fetch_row()){
       echo "{$row[1]} - online {$row[4]}
    
               {$row[2]}:{$row[3]}";
    }

    Remember that if Vladimir left column line, which was virtually redundant once grown to a size of the database realmd

  6. What bug does the patch fix? What features does the patch add?

    Incorrect operation a line for more than one realmu.

    For which repository revision was the patch created?

    8697

    Is there a thread in the bug report section or at lighthouse? 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.

    Andeeria (I'am)

    http://pastebin.com/d20b24457

    ALTER TABLE `account` ADD `ActiveRealmID` INT( 11 ) NOT NULL DEFAULT '0' AFTER `online` ;
    

    Description:

    Amendment changing the system to reset the number of people online. Erroneous query and design of this one:

    "UPDATE account SET online = 0 WHERE online > 0 "

    "AND id IN (SELECT acctid FROM realmcharacters WHERE realmid = '%d')",realmID);

    On one realm it works well, but when more than one realm, it resets all the online accounts that have characters on more than one realm.

    Yours, probably still need to improve but some small ideology. :)

  7. Hello everyone.

    He writes with a request to conduct not to write great code changes Mangos. I mean exactly the owner and facilitator of private channels and the world.

    / chatinfo - does not work correctly.

    Precisely where I need to change the code when writing the world for example.

    + Owner has the prefix *

    + Moderator has the prefix @

    I was looking for, I changed but still nothing. Thanks in advance for pointing.

    Sorry for my english

×
×
  • 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