Jump to content

roelv

Members
  • Posts

    26
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by roelv

  1. Your changes for Trintiy don't work yet because the arena_team_stats table no longer exists.

    Anyway I found some time to look into it myself and it is working for me now. I will post the code I changed.

    I think my changes in arena-ladder.php also affect mangos users making their armory not work anymore so you will have to make that Trinity only.

    arena-ladder.php

    if(isset($_GET['sf'])) {
       switch($_GET['sf']) {
           case 'rank':   // rank
           case 'name':   // name
           case 'sgw':    // wins
           case 'sgl':    // lose
           case 'rating': // rating
               if($_GET['sf'] == 'name') {
                   $sort = '`arena_team`.`name`';
               }
               elseif($_GET['sf'] == 'sgw') {
                   $sort = '`arena_team`.`weekWins`';
               }
               elseif($_GET['sf'] == 'sgl') {
                   $sort = 'lose'; // Unique sorting
               }
               else {
                   $sort = '`arena_team`.`' . $_GET['sf'] .'`';
               }
               if(!isset($_GET['sd'])) {
                   $type = 'ASC';
               }
               elseif($_GET['sd'] == 'a') {
                   $type = 'ASC';
               }
               elseif($_GET['sd'] == 'd') {
                   $type = 'DESC';
               }
               break;
       }
    }
    

    includes/classes/class.arenateams.php

    line 116

                   `weekWins`   AS `gamesWon`,
    

    line 309

                       case SERVER_TRINITY:
                           $realmArenaTeamInfo = $db->select("
                           SELECT
                           `arena_team`.`arenaTeamId` AS `arenateamid`,
                           `arena_team`.`name`,
                           `arena_team`.`rating`,
                           `arena_team`.`weekGames`   AS `gamesPlayed`,
                           `arena_team`.`weekWins`    AS `gamesWon`,
                           `arena_team`.`rank`        AS `ranking`,
                           `arena_team`.`seasonGames` AS `seasonGamesPlayed`,
                           `arena_team`.`seasonWins`  AS `seasonGamesWon`,
                           `characters`.`race`,
                           `arena_team`.`seasonGames`-`arena_team`.`seasonWins` AS `lose`
                           FROM `arena_team` AS `arena_team`
                           LEFT JOIN `characters` AS `characters` ON `characters`.`guid`=`arena_team`.`captainguid`
                           WHERE `arena_team`.`type`=%d AND `arena_team`.`rank` > 0
                           ORDER BY `lose` %s LIMIT %d, 20", $type, $sort, $page);
                           break;
    

    line 351

                       case SERVER_TRINITY:
                           $realmArenaTeamInfo = $db->select("
                           SELECT
                           `arena_team`.`arenaTeamId` AS `arenateamid`,
                           `arena_team`.`name`,
                           `arena_team`.`rating`,
                           `arena_team`.`weekGames`   AS `gamesPlayed`,
                           `arena_team`.`weekWins`    AS `gamesWon`,
                           `arena_team`.`rank`        AS `ranking`,
                           `arena_team`.`seasonGames` AS `seasonGamesPlayed`,
                           `arena_team`.`seasonWins`  AS `seasonGamesWon`,
                           `characters`.`race`
                           FROM `arena_team` AS `arena_team`
                           LEFT JOIN `characters` AS `characters` ON `characters`.`guid`=`arena_team`.`captainGuid`
                           WHERE `arena_team`.`type`=%d AND `arena_team`.`rank` > 0
                           ORDER BY %s %s LIMIT %d, 20", $type, $order, $sort, $page);
                           break;
    

  2. Do NOT use the new Trinity patch, you need to change the last part in this:

     
    -                        ((InstanceMap *)m)->PermBindAllPlayers(creditedPlayer);
    +                    {
    +                        ((InstanceMap *)m)->PermBindAllPlayers(creditedPlayer);
    +                        /** World of Warcraft Armory **/
    +                        creditedPlayer->WriteWowArmoryDatabaseLog(3, creature->GetCreatureInfo()->Entry);
    +                        /** World of Warcraft Armory **/
    +                    }
                    }
                    else
                    {
    

    Else no instances will get bound to you. 1 line of code can change so much...

  3. hy i have a problem all working fine until i tryed to log in and selected a charbut it says

    File Not Found

    This character profile could not be displayed, possibly for one of the following reasons:

    •The character has been inactive for an extended period of time.

    •The character name was spelled incorrectly.

    •The profile is temporarily unavailable while the character is in the midst of a process such as a realm transfer or faction change.

    •Characters that have been deleted are no longer available on the Armory.

    You need to apply the core patch, it won't get displayed until the data of the character is stored in the database by the patch.

  4. I noticed the guild pages don't work anymore but I am not sure if this is caused by 395 or if it already existed before this revision.

    The weird thing, the debug log doesn't show anything about this thing. Anyway this is what the page shows:

    This page contains the following errors:
    
    error on line 1 at column 20: Extra content at the end of the document
    Below is a rendering of the page up to the first error.
    
    Fatal Error:
    

  5. For trinity core patch ( wowarmory_arena_chart.patch ) after changeset 9871:

               /** World of Warcraft Armory **/
               uint32 maxChartID;
    [color=red]-           QueryResult_AutoPtr result = CharacterDatabase.PQuery("SELECT MAX(gameid) FROM armory_game_chart");[/color]
    [color=seagreen]+           QueryResult result = CharacterDatabase.PQuery("SELECT MAX(gameid) FROM armory_game_chart");[/color]
               if(!result)
                   maxChartID = 0;

    For wowarmory_patch.patch :

       if (type == 3)    // Do not write same bosses many times - just update counter.
       {
           uint8 Difficulty = GetMap()->GetDifficulty();
    [color="red"]-        QueryResult_AutoPtr result = CharacterDatabase.PQuery("SELECT counter FROM character_feed_log WHERE guid='%u' AND type=3 AND data='%u' AND difficulty='%u' LIMIT 1", pGuid, data, Difficulty);[/color]
    [color="seagreen"]+        QueryResult result = CharacterDatabase.PQuery("SELECT counter FROM character_feed_log WHERE guid='%u' AND type=3 AND data='%u' AND difficulty='%u' LIMIT 1", pGuid, data, Difficulty);[/color]
           if (result)
           {
               CharacterDatabase.PExecute("UPDATE character_feed_log SET counter=counter+1, date=UNIX_TIMESTAMP(NOW()) WHERE guid='%u' AND type=3 AND data='%u' AND difficulty='%u' LIMIT 1", pGuid, data, Difficulty);
           }
           else
           {
               CharacterDatabase.PExecute("INSERT INTO character_feed_log (guid, type, data, date, counter, difficulty) VALUES('%u', '%d', '%u', UNIX_TIMESTAMP(NOW()), 1, '%u')", pGuid, type, data, Difficulty);
           }
       }
    

    Thanks, it worked

    it won't compile without this change

  6. Complied fine TC2 rev. 9709 with these changes:

    +            else
    +            {
    +                maxChartID = (*result)[0].GetUInt32();
    [color=Red]-                delete result;[/color]
    [color=SeaGreen]+                result.release();[/color]
    +            }
    
    
    
    +                if (plTeamID == winner_arena_team->GetId())
    +                {
    +                    changeType = 1; //win
    [color=Red]-                    [/color][color=Red]resultRating = winner_rating;[/color]
    [color=SeaGreen]+                    resultRating = winner_team_rating;[/color]
    +                    resultTeamID = plTeamID;
    +                    ratingChange = winner_change;
    +                }
    +                else
    +                {
    +                    changeType = 2; //lose
    [color=Red]-                    resultRating = loser_rating;[/color]
    [color=SeaGreen]+                    resultRating = loser_team_rating;[/color]
    +                    resultTeamID = loser_arena_team->GetId();
    +                    ratingChange = loser_change;
    +                }

    This did the trick, compiled fine on single and mutli core, thank you!

  7. Like I said TC rev 9708 didn't compile for me with the arena patch but it compiled fine without the patch. I think rev 9631 did the changes which made the patch not compatible although Shadez updated it. I hope someone else can also test this and if it's only on Linux or also on Windows. If I didn't mention yet, I am using Ubuntu x64.

  8. well I thought compiling on more cores worked but it doesn't. I get some weird error and thought it was TC related but it works without the arena patch.

    [ 86%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/__/game/AI/ScriptedAI/ScriptedSimpleAI.cpp.o
    Linking CXX static library libscripts.a
    [ 86%] Built target scripts
    make: *** [all] Error 2
    

    I saw you mentioned limited support but I hope it was not your last commit ever. Anyway if you don't have time, you don't need to rush it ;)

  9. roelv, try to compile as usual (with one of processor cores, if I'm right) with patch update from [381].

    Thanks for the help but it still gives the same error, I don't know if the same thing happens on Windows but it's really weird that it only happens when compiling on one core. It won't be a real problem for me, I can compile on more cores...

  10. You need to edit the patch files yourself and change the line numbers to make it compatible with the newest core revision.

    Edit: about my compile fail, I tested some more and it only seems to happen if I only use one of the processor cores for compiling. I seems to work if I use all cores (really weird).

    Anyway here is what I get when I compile with one core, btw compiling happened on Ubuntu Linux.

    [ 19%] Building CXX object src/server/game/CMakeFiles/game.dir/Battlegrounds/Battleground.cpp.o
    /home/trinity/trinitycore/src/server/game/Battlegrounds/Battleground.cpp: In member function ‘void Battleground::EndBattleground(uint32)’:
    /home/trinity/trinitycore/src/server/game/Battlegrounds/Battleground.cpp:750: error: type ‘class QueryResult_AutoPtr’ argument given to ‘delete’, expected pointer
    compilation terminated due to -Wfatal-errors.
    make[2]: *** [src/server/game/CMakeFiles/game.dir/Battlegrounds/Battleground.cpp.o] Error 1
    make[1]: *** [src/server/game/CMakeFiles/game.dir/all] Error 2
    make: *** [all] Error 2
    

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