Jump to content

Darkruler

Members
  • Posts

    206
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by Darkruler

  1. i experience the "lag" ,as they call it, as well on Win7 x64,

    processor = Intel Core I7 920 @ 4.2 Ghz with HT enabled, CPU usage is below 10% with core and WoW running on the same pc

    Kyle, you said you did NOT experience it on a slow single-core celeron...? perhaps the faster the PC the more lag you encounter...not sure though :)

    Will check the "follow" code for any possible issues although i think Kyle has more experience with C++ looking at his commits :o

  2. there's no reason why it WOULD be a negative thing so IMO just go ahead and do it now :P

    my next idea is to make it completely standalone (use it's own functions) so that compiling wont be broken when mangos changes stuff.... but this requires some kind of information bridge between both which would decrease performance i guess

  3. did you guys know any script that could help me to copy a character? i mean his items inventory achiev etc etc. why? well it seems that i have a player with a bug and cant find the fix, so my option 1 is to recreate his character with all what he have .

    Erm no, that's not really something you should have on a website... you probably have to do it manually, the time that you took to post here could also be used to recreate his char

  4. Another update:

    <?php
    $realmd = array(
    'db_host'=> 'localhost',        // Host IP
    'db_username' => 'root',        // Database login-name
    'db_password' => 'mangos',      // Database login-pass
    'db_name_realm'=> 'realmd',     // Database name of realm
    );
    
    function check_for_symbols($string)
    {
       $len=strlen($string);
       $allowed_chars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
       for($i=0;$i<$len;$i++)if(!strstr($allowed_chars,$string[$i]))
           return TRUE;
       return FALSE;
    }
    function sha_password($user,$pass)
    {
       $user = strtoupper($user);
       $pass = strtoupper($pass);
       return SHA1($user.':'.$pass);
    }
    if ($realmd[db_host] != "" && $realmd[db_username] != "" && $realmd[db_password] != "" && $realmd[db_name_realm] != "")
    {
       $new_connect = mysql_connect($realmd[db_host],$realmd[db_username],$realmd[db_password]);
       if ($new_connect)
           $selectdb = mysql_select_db($realmd[db_name_realm],$new_connect);
       else
       {
           echo "Could NOT connect to db: Configs (Name/Pass/Port/IP) are incorrect";
           die;
       }
    
       if ($new_connect && !$selectdb)
       {
           echo "Could NOT connect to db: Database does not exist!";
           die; 
       }
    
       if ($_POST['registration'])
       {
           $username = $_POST['username'];
           $password = sha_password($username,$_POST['password']);
           $expansionnumber = $_POST['expansion'];
    
           $check_username = mysql_query("SELECT username FROM `account` WHERE username='$username'");
           if ($username == "")
           {
               echo "Field username is empty!";
           }
           else if ($password == "")
           {
               echo "Field password is empty!";
           }
           else if (check_for_symbols($_POST[password]) == TRUE)
           {
               echo "Error with creating account: password has invalid symbols in it.";
           }
           else if (check_for_symbols($username) == TRUE)
           {
               echo "Error with creating account: username has invalid symbols in it.";
           }
           else if (mysql_num_rows($check_username) != 0)
           {
               echo "Error with creating account: name is already in use.";
           }
           else
           {
               $username = mysql_real_escape_string($username);
               mysql_query("INSERT INTO account (username,sha_pass_hash,expansion) VALUES
    ('$username','$password','$expansionnumber')");
               if (mysql_error)
                   echo mysql_errno($new_connect) . ": " . mysql_error($new_connect). "\\n";
               else
               {
                   echo "Account created.";
                   mysql_close($new_connect);
               }
           }
       }
       else
       {
           ?>
           <html>
           <form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST">
           Username <input type="text" name="username">
           Password <input type="password" name="password">
           Expansion Selection<select name="expansion">
               <option value="1">Vanilla</option>
               <option value="2">TBC</option>
               <option value="3">WotLK</option>
           </select>
           <input type="submit" name="registration">
           </form>
           </html>
           <?php
       }
    }
    else
       echo "Config file either not present or connection variables are empty";
    ?>
    

    added expansion selection dropdown menu, a better check for the pass and name and a check for empty variables in the connection array on the top

    oh and display the mysql error number with feedback if, for whatever reason, there's an error during the query importing

  5. Would anybody have the update patch please (rev 10175)?

    Why do you need a patch each time?

    git bash:

    git clone -b vehicle git://github.com/Tasssadar/Valhalla-Project.git Source         // clones the vehicle branch from tass into a new folder called Source
    cd Source
    git pull git://github.com/mangos/mangos.git master                                  // pulls all changes newer than the ones in Tass's branch from the master branch of mangos
    git gui                                                                             // if needed check the merge conflicts here and solve them
    

    after that compile the core as usual, next time you want to compile a core, all you need to do is:

    cd */Source
    git pull git://github.com/Tasssadar/Valhalla-Project.git vehicle               // if tass made new commits, download them
    git gui                                                                        // probably get merge errors, check them out here and solve them
    git pull git://github.com/mangos/mangos.git master                             // update to the newest mangos rev
    git gui                                                                        // if you got any merge conflicts, check and solve here
    

    this way you only need the patch ONCE

  6. std::string message;
    message = put your text here; // you could use a config from mangosd.conf for this (hope you know how )
    if (message) // this check is only needed if you used a config for it.. if it's not set it will give a false here... if this check wouldn't be here and the message is empty it will crash
    {
           WorldPacket data(SMSG_NOTIFICATION, (message.size()+1));
           data << message;
           sWorld.SendGlobalMessage(&data);
    }
    

    or more advanced way:

     std::ostringstream msg;
     std::ostringstream pvpVictimName;
     std::ostringstream pvpPlayerName;
    
     pvpVictimName << pvpVictim->GetName();
     pvpPlayerName << pvpPlayer->GetName();
    
     msg << pvpVictimName .str().c_str() << "lost a" << OldVictimKillingSpree*10 << "kill, killing spree by" << ... << ... << "]";
     SendWorldText(LANG_SYSTEMMESSAGE, msg.str().c_str());
    

    note that you have to finish the 2nd one... i wont do everything for ya

  7. Hi,

    Can someone please tell me how to check if some one is in group ... and i tried using this to check if the person's group is a raid group but it makes the server crash:

    if(pvpPlayer->GetGroup()->isRaidGroup())
    {
       //If player is in a raid group
    }

    Thank you

    You first have to check if he's in a group, AFTER checking that you can check the grouptype (isRaidGroup() in your case) otherwise it will run the check for raid group even when the player is not in a group

    if(pvpPlayer->GetGroup() && pvpPlayer->GetGroup()->isRaidGroup())
    {
       // Do something
    }
    

  8. Hi,

    If you describe your system we maybe able to help you. kaxias may well be right. I gather from your error dump, that your using Windows, but which compiler (& version) are you using. It would also help if you could provide versions for the code your trying to compile.

    Please get back to us.

    i can give you the list of errors on playerbot as well xD

    10>..\\..\\src\\game\\PlayerbotAI.cpp(869): error C3083: 'AuraMap': the symbol to the left of a '::' must be a type
    10>..\\..\\src\\game\\PlayerbotAI.cpp(869): error C2039: 'const_iterator' : is not a member of 'Unit'
    10>          c:\\sources\\core\\src\\game\\Unit.h(1117) : see declaration of 'Unit'
    10>..\\..\\src\\game\\PlayerbotAI.cpp(869): error C2065: 'const_iterator' : undeclared identifier
    10>..\\..\\src\\game\\PlayerbotAI.cpp(869): error C2146: syntax error : missing ';' before identifier 'iter'
    10>..\\..\\src\\game\\PlayerbotAI.cpp(869): error C2065: 'iter' : undeclared identifier
    10>..\\..\\src\\game\\PlayerbotAI.cpp(869): error C2039: 'GetAuras' : is not a member of 'Unit'
    10>          c:\\sources\\core\\src\\game\\Unit.h(1117) : see declaration of 'Unit'
    10>..\\..\\src\\game\\PlayerbotAI.cpp(869): error C2228: left of '.begin' must have class/struct/union
    10>..\\..\\src\\game\\PlayerbotAI.cpp(869): error C2065: 'iter' : undeclared identifier
    10>..\\..\\src\\game\\PlayerbotAI.cpp(869): error C2039: 'GetAuras' : is not a member of 'Unit'
    10>          c:\\sources\\core\\src\\game\\Unit.h(1117) : see declaration of 'Unit'
    10>..\\..\\src\\game\\PlayerbotAI.cpp(869): error C2228: left of '.end' must have class/struct/union
    10>..\\..\\src\\game\\PlayerbotAI.cpp(869): error C2143: syntax error : missing ')' before '++'
    10>..\\..\\src\\game\\PlayerbotAI.cpp(869): error C2059: syntax error : ';'
    10>..\\..\\src\\game\\PlayerbotAI.cpp(869): error C2065: 'iter' : undeclared identifier
    10>..\\..\\src\\game\\PlayerbotAI.cpp(869): error C2059: syntax error : ')'
    10>..\\..\\src\\game\\PlayerbotAI.cpp(870): error C2143: syntax error : missing ';' before '{'
    10>..\\..\\src\\game\\PlayerbotAI.cpp(871): error C2065: 'iter' : undeclared identifier
    10>..\\..\\src\\game\\PlayerbotAI.cpp(871): error C2227: left of '->second' must point to class/struct/union/generic type
    10>          type is ''unknown-type''
    10>..\\..\\src\\game\\PlayerbotAI.cpp(871): error C2227: left of '->GetId' must point to class/struct/union/generic type
    

    basically the problems are in those 3 lines so it shouldn't be that hard to solve them (will get to that after i solve spellauras.cpp, lots of issues during our custom content *sigh*)

  9. Not to keep this topic going but there's a wiki page on getmangos.eu describing Hosting Behind a Router which explains exactly how to do this, however from what Darkruler stated if we're not allowed to do it on the forums at getmangos.eu, is that wiki page allowed to exist?

    Not trying to make anyone mad by suggesting that it be removed, but its contradicting to have a wiki page and then say we can't repeat the same info on the forums on the same domain/organization

    No clue why it is done that way, but i've had angry devs removing my posts concerning this topic before

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