Jump to content

Darkruler

Members
  • Posts

    206
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Darkruler

  1. You made an array with images, change it back to what it was ( $class = array(1=>"Warrior",2=>"Paladin",3=>"Hunter",4=>"Rogue",5=>"Priest",6=>"Death Knight",7=>"Shaman",8=>"Mage",9=>"Warlock",11=>"Druid"); ) and instead of $race[$t_race]; use [img=img/race/]'; so if $t_race = 1 (Warrior) and $t_gender = 1 (Female) it will result in "img/race/1-1.gif"
  2. test this: <?php $reading = @fopen('config.php', 'r'); if ($reading) include ("config.php"); else { $user = "root"; $host = "localhost"; $port = "3306"; $pass = "mangos"; $mangoscharacters = "characters"; } $host = $host.":".$port; $characters = mysql_connect("$host", "$user", "$pass") or die('Connection Failed'); mysql_selectdb ("$mangoscharacters") or die('Cannot connect to Characters Database'); $result = mysql_query("SELECT s.rating, a.name, s.wins2, s.played FROM arena_team_stats AS s LEFT JOIN arena_team AS a ON s.arenateamid = a.arenateamid WHERE a.type = 2 ORDER BY s.rating DESC LIMIT 10;"); ?> <font color=#000000> <table align=center cellpadding="0" cellspacing="0" border="1" width=100%> <thead> <td><center>Nº</center></td> <td><center>Name</center></td> <td><center>Rating</center></td> <td><center>Wins2</center></td> <td><center>Played</center></td> </thead> <tbody> <?php while($rows = mysql_fetch_object($result)) { $i++; $name = $rows->name; $rating= $rows->rating; $wins2 = $rows->wins2; $played= $rows->played; echo " <tr> <td><center>",$i,"</center></td> <td>[i]",$name,"[/i]</td> <td><center>",$rating,"</center></td> <td><center>",$wins2,"</center></td> <td><center>",$played,"</center></td> </tr> "; } mysql_close($characters); ?> Notes : -The query comes from darkstalker's previous post -Not tested this, not even if it gives PHP errors... don't have any chars in my DB
  3. nope can't confirm... dont have a DB with chars who have an arena team can you export one of your chars so i can see what happens?
  4. so at which point does it stop working? 1. Enter name and email adres 2. Submit 3. Process the form, insert a random integer into the reset_password field of that account 4. Send email with a link with which you can receive the pass after the change -- User action: open email and click link 5. Open the link, get functions retrieve the random integer from the link 6. the random integer gets queried, this results in finding the accountname again 7. field sha_pass_hash gets set to the contains of reset_pass 8. reset_pass gets emptied (basically deactivating the link in the email)
  5. i merely made it work, i didn't intend to actually make it safe and efficient by only retrieving the required data....but thanks for sharing thoughts anyway...i'll change it changed version: <?php $reading = @fopen('config.php', 'r'); if ($reading) include ("config.php"); else { $user = "root"; $host = "localhost"; $port = "3306"; $pass = "mangos"; $mangoscharacters = "characters"; } $host = $host.":".$port; $characters = mysql_connect("$host", "$user", "$pass") or die('Connection Failed'); mysql_selectdb ("$mangoscharacters") or die('Cannot connect to Characters Database'); $result = mysql_query("SELECT `name`, `level`, `totalKills`, `totalHonorPoints` FROM `characters` ORDER BY `totalKills` DESC LIMIT 0 , 100 "); ?> <font color=#000000> <table align=center cellpadding="0" cellspacing="0" border="1" width=100%> <thead> <td width="4%"><center>Nº</center></td> <td width="16%"><center>Character Name</center></td> <td width="4%"><center>level</center></td> <td width="5%"><center>Honor</center></td> <td width="4%"><center>Kills</center></td> </thead> <tbody> <?php while($rows = mysql_fetch_object($result)) { $i++; $name = $rows->name; $level = $rows->level; $Total_Kills = $rows->totalKills; $Total_Honor = $rows->totalHonorPoints; echo " <tr> <td><center>",$i,"</center></td> <td>[i]",$name,"[/i]</td> <td><center>",$level,"</center></td> <td><center>",$Total_Honor,"</center></td> <td><center>",$Total_Kills,"</center></td> </tr>"; } mysql_close($characters); ?>
  6. You're right, it doesn't work.... fixed version: <?php $reading = @fopen('config.php', 'r'); if ($reading) include ("config.php"); else { $user = "root"; $host = "localhost"; $port = "3306"; $pass = "mangos"; $mangoscharacters = "characters"; } $host = $host.":".$port; $characters = mysql_connect("$host", "$user", "$pass") or die('Connection Failed'); mysql_selectdb ("$mangoscharacters") or die('Cannot connect to Characters Database'); $result = mysql_query("SELECT * FROM `characters` ORDER BY `totalKills` DESC LIMIT 0 , 100 "); ?> <font color=#000000> <table align=center cellpadding="0" cellspacing="0" border="1" width=100%> <thead> <td width="4%"><center>Nº</center></td> <td width="16%"><center>Character Name</center></td> <td width="4%"><center>level</center></td> <td width="5%"><center>Honor</center></td> <td width="4%"><center>Kills</center></td> </thead> <tbody> <?php while($rows = mysql_fetch_object($result)) { $i++; $name = $rows->name; $level = $rows->level; $Total_Kills = $rows->totalKills; $Total_Honor = $rows->totalHonorPoints; echo " <tr> <td><center>",$i,"</center></td> <td>[i]",$name,"[/i]</td> <td><center>",$level,"</center></td> <td><center>",$Total_Honor,"</center></td> <td><center>",$Total_Kills,"</center></td> </tr>"; } mysql_close($characters); ?> NOTE: Made some usefull changes as well
  7. New version, fixed the login issue with the cookie and changed the race/class numbers to words and added map and gender <?php $CookieExpireTime = "600"; // cookie get's deleted by the browser in 600 seconds (AKA 10 minutes) $reading = @fopen("config.php", 'r'); if ($reading) // if we can read the config.php file that's on the frontpage... include "config.php"; else // else, we define them here { $port = "3306"; $host = "localhost"; $user = "root"; $pass = "mangos"; $mangoscharacters = "characters"; $mangosrealm = "realmd"; } if (!(isset($_COOKIE['logged_in'])) && ($_POST['password'] == "" || $_POST['username'] == "")) // if the form is not posted and the cookie not present { ?> <html> <body> <form name="login" method="POST" action="<?php echo $_SERVER['PHP_SELF'];?>"> Username: <input type="text" name="username"> Password: <input type="password" name="password"> <input type="submit" value="Log in"> </form> </body> </html> <?php } else if (($_POST['username'] != "" && $_POST['password'] != "") || isset($_COOKIE['logged_in'])) // if something was posted or the cookie is present { if (!isset($_COOKIE['logged_in'])) // get the name and pass from the form and make the pass sha encrypted { $username = $_POST['username']; $password = $_POST['password']; $username = strtoupper($username); $password = strtoupper($password); $password = SHA1($username.':'.$password); } else // else, we read the cookie { $parts = explode(",", $_COOKIE['logged_in']); // split the cookie's contents at the comma $username = $parts[0]; // part 1 is the username $password = $parts[1]; // part 2 is the password } $class = array(1=>"Warrior",2=>"Paladin",3=>"Hunter",4=>"Rogue",5=>"Priest",6=>"Death Knight",7=>"Shaman",8=>"Mage",9=>"Warlock",11=>"Druid"); $race = array(1=>"Human",2=>"Orc",3=>"Dwarf",4=>"Night Elf",5=>"Undead",6=>"Tauren",7=>"Gnome",8=>"Troll",10=>"Blood Elf",11=>"Draenei"); $map = array(0=>"Eastern Kingdoms",1=>"Kalimdor",33=>"Shadowfang Keep",34=>"Stormwind Stockade",35=>"Stormwind Prison",36=>"Deadmines",43=>"Wailing Caverns",44=>"Monastery",47=>"Razorfen Kraul",48=>"Blackfathom",70=>"Uldaman",90=>"Gnomeragon",109=>"Sunken Temple",129=>"Razorfen Downs",169=>"Emerald Dream",189=>"Monastery",209=>"Tanaris",229=>"Black Rock Spire",230=>"Black Rock Depths",249=>"Onyxia Lair",269=>"Caverns Of Time",289=>"School of Necromancy",309=>"Zulgurub",329=>"Stratholme",349=>"Mauradon",369=>"Deeprun Tram",389=>"Orgrimmar",409=>"MoltenCore",429=>"DireMaul",469=>"Blackwing Lair",509=>"AhnQiraj",530=>"Dalaran",531=>"AhnQiraj Temple",532=>"Karazahn",533=>"Stratholme",534=>"Hyjal Past",540=>"Hellfire Military",542=>"Hellfire Demon",543=>"Hellfire Rampart",544=>"Hellfire Raid",545=>"Coilfang Pumping",546=>"Coilfang Marsh",547=>"Coilfang Draenei",548=>"Coilfang Raid",550=>"Tempest Keep Raid",552=>"Tempest Keep Arcane",553=>"Tempest Keep Atrium",554=>"Tempest Keep Factory",555=>"Auchindoun Shadow",556=>"Auchindoun Demon",557=>"Auchindoun Ethereal",558=>"Auchindoun Draenei",560=>"Hillsbrad Past",562=>"Blades Edge Arena",564=>"Black Temple",565=>"Gruuls Lair",566=>"Netherstorm BG",568=>"ZulAman",571=>"Northrend",574=>"Valgarde 70",575=>"Utgarde Pinnacle",576=>"Nexus 70",578=>"Nexus 80",580=>"Sunwell Plateau",595=>"Stratholme COT",598=>"Sunwell 5",599=>"Ulduar 70",600=>"Drak Theron Keep",602=>"Ulduar 80",603=>"Ulduar Raid",604=>"GunDrak",607=>"Northrend BG",608=>"Violet Hold",609=>"Ebon Hold",615=>"The Obsidian Sanctum",616=>"The Eye of Eternity",617=>"Dalaran Sewers",618=>"The Ring of Valor",619=>"Ahn'kahet: The Old Kingdom",624=>"Vault of Archavon",628=>"Isle of Conquest",631=>"Icecrown Citadel Raid",632=>"Forge of Souls",649=>"Argent Tournament Raid",650=>"Argent Tournament Dungeon",658=>"Pit Of Saron",668=>"Halls of Reflection",723=>"Stormwind",724=>"The Ruby Sanctum"); $gender = array(0=>"Male",1=>"Female"); $host = $host.":".$port; $connection = mysql_connect($host, $user, $pass); if ($connection) $connected_db = mysql_select_db($mangosrealm); if ($connection && $connected_db) { $query = mysql_query("SELECT `sha_pass_hash`, `id` FROM `account` WHERE `username` = '$username';"); if (mysql_num_rows($query) != 0) { $fields = mysql_fetch_assoc($query); $real_pass = $fields['sha_pass_hash']; $id = $fields['id']; if ($password == $real_pass) { setcookie("logged_in", $username.",".$password, time()+$CookieExpireTime); mysql_select_db($mangoscharacters); $getchars = mysql_query("SELECT * FROM `characters` WHERE `account` = '$id';"); //query to get all the char fields from the DB if ($getchars) { $charinfo = mysql_fetch_assoc($getchars); // get all the fields from the query echo ' <table border="0.5"> <tr> <th>Name</th> <th>Race</th> <th>Class</th> <th>Level</th> <th>Map</th> <th>Gender</th> </tr> <tr> <td>'.$charinfo['name'].'</td> <td>'.$race[$charinfo['race']].'</td> <td>'.$class[$charinfo['class']].'</td> <td>'.$charinfo['level'].'</td> <td>'.$map[$charinfo['map']].'</td> <td>'.$gender[$charinfo['gender']].'</td> </tr> </table> '; } else die("You don't have any characters"); } else die("Wrong pass!"); } else die("Account does not exist!"); } } ?> Edit: added variable on the top so you can set the cookie's expire time Edit2: If you want an image to be displayed next to the race, you could change <td>'.$race[$charinfo['race']].'</td> into <td>[img=img/'.$race[$charinfo['race']].'.jpg] '.$race[$charinfo['race']].'</td> this will load the image "tauren.jpg" from the "img" subfolder, which you'll have to supply yourself, if your race is "tauren" ( $race[$charinfo['race']] returns the racename )
  8. @wowgamer, let me know if this what you want: <?php $reading = @fopen("config.php", 'r'); if ($reading) // if we can read the config.php file that's on the frontpage... include "config.php"; else // else, we define them here { $port = "3306"; $host = "localhost"; $user = "root"; $pass = "mangos"; $mangoscharacters = "characters"; $mangosrealm = "realmd"; } if (!(isset($_COOKIE['logged_in'])) && $_POST['password'] == "") // if the form is not posted and the cookie not present { ?> <html> <body> <form name="login" method="POST" action="<?php echo $_SERVER['PHP_SELF'];?>"> Username: <input type="text" name="username"> Password: <input type="password" name="password"> <input type="submit" value="Log in"> </form> </body> </html> <?php } else if (($_POST['username'] != "" && $_POST['password'] != "") || isset($_COOKIE['logged_in'])) // if something was posted or the cookie is present { if (!isset($_COOKIE['logged_in'])) // get the name and pass from the form and make the pass sha encrypted { $username = $_POST['username']; $password = $_POST['password']; $username = strtoupper($username); $password = strtoupper($password); $password = SHA1($username.':'.$password); } else // else, we read the cookie { $parts = explode(",", $_COOKIE['logged_in']); // split the cookie's contents at the comma $username = $parts[0]; // part 1 is the username $password = $parts[1]; // part 2 is the password } $host = $host.":".$port; $connection = mysql_connect($host, $user, $pass); if ($connection) $connected_db = mysql_select_db($mangosrealm); if ($connection && $connected_db) { $query = mysql_query("SELECT `sha_pass_hash`, `id` FROM `account` WHERE `username` = '$username';"); if (mysql_num_rows($query) != 0) { $fields = mysql_fetch_assoc($query); $real_pass = $fields['sha_pass_hash']; $id = $fields['id']; if ($password == $real_pass) { setcookie("logged_in", "$username, $password", time()+600); mysql_select_db($mangoscharacters); $getchars = mysql_query("SELECT * FROM `characters` WHERE `account` = '$id';"); //query to get all the char fields from the DB if ($getchars) { $charinfo = mysql_fetch_assoc($getchars); // get all the fields from the query echo ' <table> <tr> <th>| Name</th> // display the column names <th>| Race</th> <th>| Class</th> <th>| Level</th> </tr> <tr> <td>| '.$charinfo['name'].'</td> // display the content of field "name" <td>| '.$charinfo['race'].'</td> <td>| '.$charinfo['class'].'</td> <td>| '.$charinfo['level'].'</td> </tr> </table> '; } else die("You don't have any characters"); } else die("Wrong pass!"); } else die("Account does not exist!"); } } ?> NOTES: - You can print the other fields from "characters" as well using the same way as i did the current 4 - You can use the cookie made by the script on ANY page you want, it contains the username and sha encrypted password (in my code, there's also an example on how to read it
  9. place "" in front of the class/race (in the code) where IMAGE_LINK is the RELATIVE path to the picture you want there if you want a list of all your chars, i'll write another script for that...but it requires the input of ATLEAST the account name...
  10. right mouse button on the "mangos" database -> import -> "restore from sql dump" now import the files one by one, the structure is: version_subversion_affecteddatabase_affectedtable.sql import all files with the "affecteddatabase" part being "mangos" and the version HIGHER than the one you have
  11. Sorry guys, been busy with school, didn't even know you responded iRelax anyway, thanks Laise... now i can easily learn from it
  12. Wouldn't it be better to start learning (global) C++ before getting into the Networking part? seems you're trying to do a too big leap
  13. Levels required for instances are a database issue, post it over at the PSDB forums plus even if you got in, official SD2 doesn't have ANY part of it working EDIT: Seems this page was cached, i could've sworn there were no other reactions above mine... oh well
  14. Yup you're right... seems the "Aspell" library for Notepad++ isn't very good for these kind of jobs... oh well... will adjust once im back home;)
  15. 2 more patches with typo fixes From f75158a1dba5ae4c440cf5ed5134f299708dc3ce Mon Sep 17 00:00:00 2001 From: Dark <[email protected]> Date: Sun, 5 Sep 2010 21:14:39 +0200 Subject: [PATCH] EQUIPED -> EQUIPPED Signed-off-by: Dark <[email protected]> --- src/game/AchievementMgr.cpp | 6 +++--- src/game/AchievementMgr.h | 4 ++-- src/game/ItemPrototype.h | 2 +- src/game/Player.cpp | 10 +++++----- src/game/Player.h | 2 +- src/game/StatSystem.cpp | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/game/AchievementMgr.cpp b/src/game/AchievementMgr.cpp index 3ef1762..148b484 100644 --- a/src/game/AchievementMgr.cpp +++ b/src/game/AchievementMgr.cpp @@ -244,10 +244,10 @@ bool AchievementCriteriaRequirement::IsValid(AchievementCriteriaEntry const* cri return false; } return true; - case ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPED_ITEM_LVL: + case ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPPED_ITEM_LVL: if(equipped_item.item_quality >= MAX_ITEM_QUALITY) { - sLog.outErrorDb( "Table `achievement_criteria_requirement` (Entry: %u Type: %u) for requirement ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPED_ITEM (%u) have unknown quality state in value1 (%u), ignore.", + sLog.outErrorDb( "Table `achievement_criteria_requirement` (Entry: %u Type: %u) for requirement ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPPED_ITEM (%u) have unknown quality state in value1 (%u), ignore.", criteria->ID, criteria->requiredType,requirementType,equipped_item.item_quality); return false; } @@ -350,7 +350,7 @@ bool AchievementCriteriaRequirement::Meets(uint32 criteria_id, Player const* sou } return data->CheckAchievementCriteriaMeet(criteria_id, source, target, miscvalue1); } - case ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPED_ITEM_LVL: + case ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPPED_ITEM_LVL: { Item* item = source->GetItemByPos(INVENTORY_SLOT_BAG_0,miscvalue1); if (!item) diff --git a/src/game/AchievementMgr.h b/src/game/AchievementMgr.h index 07ed0fa..3777114 100644 --- a/src/game/AchievementMgr.h +++ b/src/game/AchievementMgr.h @@ -62,7 +62,7 @@ enum AchievementCriteriaRequirementType ACHIEVEMENT_CRITERIA_REQUIRE_HOLIDAY = 16, // holiday_id 0 event in holiday time ACHIEVEMENT_CRITERIA_REQUIRE_BG_LOSS_TEAM_SCORE = 17, // min_score max_score player's team win bg and opposition team have team score in range ACHIEVEMENT_CRITERIA_REQUIRE_INSTANCE_SCRIPT = 18, // 0 0 maker instance script call for check current criteria requirements fit - ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPED_ITEM_LVL = 19, // item_level item_quality fir equipped item in slot `misc1` to item level and quality + ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPPED_ITEM_LVL = 19, // item_level item_quality fir equipped item in slot `misc1` to item level and quality }; #define MAX_ACHIEVEMENT_CRITERIA_REQUIREMENT_TYPE 20 // maximum value in AchievementCriteriaRequirementType enum @@ -157,7 +157,7 @@ struct AchievementCriteriaRequirement uint32 max_score; } bg_loss_team_score; // ACHIEVEMENT_CRITERIA_REQUIRE_INSTANCE_SCRIPT = 18 (no data) - // ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPED_ITEM = 19 + // ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPPED_ITEM = 19 struct { uint32 item_level; diff --git a/src/game/ItemPrototype.h b/src/game/ItemPrototype.h index d47879e..fde8ebe 100644 --- a/src/game/ItemPrototype.h +++ b/src/game/ItemPrototype.h @@ -93,7 +93,7 @@ enum ItemBondingType { NO_BIND = 0, BIND_WHEN_PICKED_UP = 1, - BIND_WHEN_EQUIPED = 2, + BIND_WHEN_EQUIPPED = 2, BIND_WHEN_USE = 3, BIND_QUEST_ITEM = 4, BIND_QUEST_ITEM1 = 5 // not used in game diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 61e49cb..ee961bb 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -7240,7 +7240,7 @@ void Player::_ApplyItemBonuses(ItemPrototype const *proto, uint8 slot, bool appl ApplyFeralAPBonus(feral_bonus, apply); } - if(!IsUseEquipedWeapon(slot==EQUIPMENT_SLOT_MAINHAND)) + if(!IsUseEquippedWeapon(slot==EQUIPMENT_SLOT_MAINHAND)) return; if (proto->Delay) @@ -9046,7 +9046,7 @@ Item* Player::GetWeaponForAttack(WeaponAttackType attackType, bool nonbroken, bo if (!item || item->GetProto()->Class != ITEM_CLASS_WEAPON) return NULL; - if (useable && !IsUseEquipedWeapon(attackType==BASE_ATTACK)) + if (useable && !IsUseEquippedWeapon(attackType==BASE_ATTACK)) return NULL; if (nonbroken && item->IsBroken()) @@ -10913,7 +10913,7 @@ Item* Player::_StoreItem( uint16 pos, Item *pItem, uint32 count, bool clone, boo if (pItem->GetProto()->Bonding == BIND_WHEN_PICKED_UP || pItem->GetProto()->Bonding == BIND_QUEST_ITEM || - (pItem->GetProto()->Bonding == BIND_WHEN_EQUIPED && IsBagPos(pos))) + (pItem->GetProto()->Bonding == BIND_WHEN_EQUIPPED && IsBagPos(pos))) pItem->SetBinding( true ); if (bag == INVENTORY_SLOT_BAG_0) @@ -10959,7 +10959,7 @@ Item* Player::_StoreItem( uint16 pos, Item *pItem, uint32 count, bool clone, boo { if (pItem2->GetProto()->Bonding == BIND_WHEN_PICKED_UP || pItem2->GetProto()->Bonding == BIND_QUEST_ITEM || - (pItem2->GetProto()->Bonding == BIND_WHEN_EQUIPED && IsBagPos(pos))) + (pItem2->GetProto()->Bonding == BIND_WHEN_EQUIPPED && IsBagPos(pos))) pItem2->SetBinding( true ); pItem2->SetCount( pItem2->GetCount() + count ); @@ -11152,7 +11152,7 @@ void Player::VisualizeItem( uint8 slot, Item *pItem) return; // check also BIND_WHEN_PICKED_UP and BIND_QUEST_ITEM for .additem or .additemset case by GM (not binded at adding to inventory) - if( pItem->GetProto()->Bonding == BIND_WHEN_EQUIPED || pItem->GetProto()->Bonding == BIND_WHEN_PICKED_UP || pItem->GetProto()->Bonding == BIND_QUEST_ITEM ) + if( pItem->GetProto()->Bonding == BIND_WHEN_EQUIPPED || pItem->GetProto()->Bonding == BIND_WHEN_PICKED_UP || pItem->GetProto()->Bonding == BIND_QUEST_ITEM ) pItem->SetBinding( true ); DEBUG_LOG( "STORAGE: EquipItem slot = %u, item = %u", slot, pItem->GetEntry()); diff --git a/src/game/Player.h b/src/game/Player.h index 8d47f75..09f299a 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1341,7 +1341,7 @@ class MANGOS_DLL_SPEC Player : public Unit void AddArmorProficiency(uint32 newflag) { m_ArmorProficiency |= newflag; } uint32 GetWeaponProficiency() const { return m_WeaponProficiency; } uint32 GetArmorProficiency() const { return m_ArmorProficiency; } - bool IsUseEquipedWeapon( bool mainhand ) const + bool IsUseEquippedWeapon( bool mainhand ) const { // disarm applied only to mainhand weapon return !IsInFeralForm() && (!mainhand || !HasFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISARMED) ); diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp index f6e30e1..0edbc3d 100644 --- a/src/game/StatSystem.cpp +++ b/src/game/StatSystem.cpp @@ -438,7 +438,7 @@ void Player::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, fl weapon_mindamage = lvl*0.85f*att_speed; weapon_maxdamage = lvl*1.25f*att_speed; } - else if(!IsUseEquipedWeapon(attType==BASE_ATTACK)) //check if player not in form but still can't use weapon (broken/etc) + else if(!IsUseEquippedWeapon(attType==BASE_ATTACK)) //check if player not in form but still can't use weapon (broken/etc) { weapon_mindamage = BASE_MINDAMAGE; weapon_maxdamage = BASE_MAXDAMAGE; -- 1.7.0.2.msysgit.0 From a5b15c8b7c5a29a8d4247010898cbff2df4ae1f8 Mon Sep 17 00:00:00 2001 From: Dark <[email protected]> Date: Sun, 5 Sep 2010 21:39:09 +0200 Subject: [PATCH] More typo fixes Signed-off-by: Dark <[email protected]> --- src/game/Guild.cpp | 60 ++++++++++++++++++++++++++-------------------------- 1 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/game/Guild.cpp b/src/game/Guild.cpp index a8ad04f..2c06289 100644 --- a/src/game/Guild.cpp +++ b/src/game/Guild.cpp @@ -879,7 +879,7 @@ void Guild::LoadGuildEventLogFromDB() NewEvent.TimeStamp = fields[5].GetUInt64(); // There can be a problem if more events have same TimeStamp the ORDER can be broken when fields[0].GetUInt32() == configCount, but - // events with same timestamp can appear when there is lag, and we naivly suppose that mangos isn't laggy + // events with same timestamp can appear when there is lag, and we naively suppose that mangos isn't laggy // but if problem appears, player will see set of guild events that have same timestamp in bad order // Add entry to list @@ -1918,7 +1918,7 @@ void Guild::SendGuildBankTabText(WorldSession *session, uint8 TabId) BroadcastPacket(&data); } -void Guild::SwapItems(Player * pl, uint8 BankTab, uint8 BankTabSlot, uint8 BankTabDst, uint8 BankTabSlotDst, uint32 SplitedAmount ) +void Guild::SwapItems(Player * pl, uint8 BankTab, uint8 BankTabSlot, uint8 BankTabDst, uint8 BankTabSlotDst, uint32 SplittedAmount ) { // empty operation if (BankTab == BankTabDst && BankTabSlot == BankTabSlotDst) @@ -1928,10 +1928,10 @@ void Guild::SwapItems(Player * pl, uint8 BankTab, uint8 BankTabSlot, uint8 BankT if (!pItemSrc) // may prevent crash return; - if (SplitedAmount > pItemSrc->GetCount()) + if (SplittedAmount > pItemSrc->GetCount()) return; // cheating? - else if (SplitedAmount == pItemSrc->GetCount()) - SplitedAmount = 0; // no split + else if (SplittedAmount == pItemSrc->GetCount()) + SplittedAmount = 0; // no split Item *pItemDst = GetItem(BankTabDst, BankTabSlotDst); @@ -1947,17 +1947,17 @@ void Guild::SwapItems(Player * pl, uint8 BankTab, uint8 BankTabSlot, uint8 BankT return; } - if (SplitedAmount) + if (SplittedAmount) { // Bank -> Bank item split (in empty or non empty slot GuildItemPosCountVec dest; - uint8 msg = CanStoreItem(BankTabDst, BankTabSlotDst, dest, SplitedAmount, pItemSrc, false); + uint8 msg = CanStoreItem(BankTabDst, BankTabSlotDst, dest, SplittedAmount, pItemSrc, false); if (msg != EQUIP_ERR_OK) { pl->SendEquipError( msg, pItemSrc, NULL ); return; } - Item *pNewItem = pItemSrc->CloneItem( SplitedAmount ); + Item *pNewItem = pItemSrc->CloneItem( SplittedAmount ); if (!pNewItem) { pl->SendEquipError( EQUIP_ERR_ITEM_NOT_FOUND, pItemSrc, NULL ); @@ -1965,10 +1965,10 @@ void Guild::SwapItems(Player * pl, uint8 BankTab, uint8 BankTabSlot, uint8 BankT } CharacterDatabase.BeginTransaction(); - LogBankEvent(GUILD_BANK_LOG_MOVE_ITEM, BankTab, pl->GetGUIDLow(), pItemSrc->GetEntry(), SplitedAmount, BankTabDst); + LogBankEvent(GUILD_BANK_LOG_MOVE_ITEM, BankTab, pl->GetGUIDLow(), pItemSrc->GetEntry(), SplittedAmount, BankTabDst); - pl->ItemRemovedQuestCheck( pItemSrc->GetEntry(), SplitedAmount ); - pItemSrc->SetCount( pItemSrc->GetCount() - SplitedAmount ); + pl->ItemRemovedQuestCheck( pItemSrc->GetEntry(), SplittedAmount ); + pItemSrc->SetCount( pItemSrc->GetCount() - SplittedAmount ); pItemSrc->FSetState(ITEM_CHANGED); pItemSrc->SaveToDB(); // not in inventory and can be save standalone StoreItem(BankTabDst, dest, pNewItem); @@ -2034,7 +2034,7 @@ void Guild::SwapItems(Player * pl, uint8 BankTab, uint8 BankTabSlot, uint8 BankT } -void Guild::MoveFromBankToChar( Player * pl, uint8 BankTab, uint8 BankTabSlot, uint8 PlayerBag, uint8 PlayerSlot, uint32 SplitedAmount) +void Guild::MoveFromBankToChar( Player * pl, uint8 BankTab, uint8 BankTabSlot, uint8 PlayerBag, uint8 PlayerSlot, uint32 SplittedAmount) { Item *pItemBank = GetItem(BankTab, BankTabSlot); Item *pItemChar = pl->GetItemByPos(PlayerBag, PlayerSlot); @@ -2042,14 +2042,14 @@ void Guild::MoveFromBankToChar( Player * pl, uint8 BankTab, uint8 BankTabSlot, u if (!pItemBank) // Problem to get bank item return; - if (SplitedAmount > pItemBank->GetCount()) + if (SplittedAmount > pItemBank->GetCount()) return; // cheating? - else if (SplitedAmount == pItemBank->GetCount()) - SplitedAmount = 0; // no split + else if (SplittedAmount == pItemBank->GetCount()) + SplittedAmount = 0; // no split - if (SplitedAmount) + if (SplittedAmount) { // Bank -> Char split to slot (patly move) - Item *pNewItem = pItemBank->CloneItem( SplitedAmount ); + Item *pNewItem = pItemBank->CloneItem( SplittedAmount ); if (!pNewItem) { pl->SendEquipError( EQUIP_ERR_ITEM_NOT_FOUND, pItemBank, NULL ); @@ -2074,9 +2074,9 @@ void Guild::MoveFromBankToChar( Player * pl, uint8 BankTab, uint8 BankTabSlot, u } CharacterDatabase.BeginTransaction(); - LogBankEvent(GUILD_BANK_LOG_WITHDRAW_ITEM, BankTab, pl->GetGUIDLow(), pItemBank->GetEntry(), SplitedAmount); + LogBankEvent(GUILD_BANK_LOG_WITHDRAW_ITEM, BankTab, pl->GetGUIDLow(), pItemBank->GetEntry(), SplittedAmount); - pItemBank->SetCount(pItemBank->GetCount()-SplitedAmount); + pItemBank->SetCount(pItemBank->GetCount()-SplittedAmount); pItemBank->FSetState(ITEM_CHANGED); pItemBank->SaveToDB(); // not in inventory and can be save standalone pl->MoveItemToInventory(dest, pNewItem, true); @@ -2182,7 +2182,7 @@ void Guild::MoveFromBankToChar( Player * pl, uint8 BankTab, uint8 BankTabSlot, u } -void Guild::MoveFromCharToBank( Player * pl, uint8 PlayerBag, uint8 PlayerSlot, uint8 BankTab, uint8 BankTabSlot, uint32 SplitedAmount ) +void Guild::MoveFromCharToBank( Player * pl, uint8 PlayerBag, uint8 PlayerSlot, uint8 BankTab, uint8 BankTabSlot, uint32 SplittedAmount ) { Item *pItemBank = GetItem(BankTab, BankTabSlot); Item *pItemChar = pl->GetItemByPos(PlayerBag, PlayerSlot); @@ -2200,22 +2200,22 @@ void Guild::MoveFromCharToBank( Player * pl, uint8 PlayerBag, uint8 PlayerSlot, if (!IsMemberHaveRights(pl->GetGUIDLow(), BankTab, GUILD_BANK_RIGHT_DEPOSIT_ITEM)) return; - if (SplitedAmount > pItemChar->GetCount()) + if (SplittedAmount > pItemChar->GetCount()) return; // cheating? - else if (SplitedAmount == pItemChar->GetCount()) - SplitedAmount = 0; // no split + else if (SplittedAmount == pItemChar->GetCount()) + SplittedAmount = 0; // no split - if (SplitedAmount) + if (SplittedAmount) { // Char -> Bank split to empty or non-empty slot (partly move) GuildItemPosCountVec dest; - uint8 msg = CanStoreItem(BankTab, BankTabSlot, dest, SplitedAmount, pItemChar, false); + uint8 msg = CanStoreItem(BankTab, BankTabSlot, dest, SplittedAmount, pItemChar, false); if (msg != EQUIP_ERR_OK) { pl->SendEquipError( msg, pItemChar, NULL ); return; } - Item *pNewItem = pItemChar->CloneItem( SplitedAmount ); + Item *pNewItem = pItemChar->CloneItem( SplittedAmount ); if (!pNewItem) { pl->SendEquipError( EQUIP_ERR_ITEM_NOT_FOUND, pItemChar, NULL ); @@ -2227,14 +2227,14 @@ void Guild::MoveFromCharToBank( Player * pl, uint8 PlayerBag, uint8 PlayerSlot, { sLog.outCommand(pl->GetSession()->GetAccountId(),"GM %s (Account: %u) deposit item: %s (Entry: %d Count: %u) to guild bank (Guild ID: %u )", pl->GetName(),pl->GetSession()->GetAccountId(), - pItemChar->GetProto()->Name1, pItemChar->GetEntry(), SplitedAmount, m_Id); + pItemChar->GetProto()->Name1, pItemChar->GetEntry(), SplittedAmount, m_Id); } CharacterDatabase.BeginTransaction(); - LogBankEvent(GUILD_BANK_LOG_DEPOSIT_ITEM, BankTab, pl->GetGUIDLow(), pItemChar->GetEntry(), SplitedAmount); + LogBankEvent(GUILD_BANK_LOG_DEPOSIT_ITEM, BankTab, pl->GetGUIDLow(), pItemChar->GetEntry(), SplittedAmount); - pl->ItemRemovedQuestCheck( pItemChar->GetEntry(), SplitedAmount ); - pItemChar->SetCount(pItemChar->GetCount()-SplitedAmount); + pl->ItemRemovedQuestCheck( pItemChar->GetEntry(), SplittedAmount ); + pItemChar->SetCount(pItemChar->GetCount()-SplittedAmount); pItemChar->SetState(ITEM_CHANGED); pl->SaveInventoryAndGoldToDB(); StoreItem(BankTab, dest, pNewItem); -- 1.7.0.2.msysgit.0 didn't feel like making a new thread for those
  16. I'll post a patch for that too, thanks for noticing (and scanning with a dictionary for more spelling probs ) EDIT: Updated first post with the suggestion of Darkstalker included
  17. try: From d1aa4dfb671b87ebb12dbb7b4419e2ea30be7ce2 Mon Sep 17 00:00:00 2001 From: Dark <[email protected]> Date: Fri, 20 Aug 2010 20:09:01 +0200 Subject: [PATCH] Possible fix for ShadowMourne visual effect Signed-off-by: Dark <[email protected]> --- src/game/UnitAuraProcHandler.cpp | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp index 4b09458..28b1230 100644 --- a/src/game/UnitAuraProcHandler.cpp +++ b/src/game/UnitAuraProcHandler.cpp @@ -960,9 +960,24 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura return SPELL_AURA_PROC_FAILED; SpellAuraHolder *aurHolder = GetSpellAuraHolder(71905); - if (aurHolder && uint32(aurHolder->GetStackAmount() + 1) >= aurHolder->GetSpellProto()->StackAmount) + if (aurHolder && uint32(aurHolder->GetStackAmount() + 1) == 0) + { + RemoveAurasDueToSpell(72521); // Remove First Effect + RemoveAurasDueToSpell(72523); // Remove Second Effect + } + else if (aurHolder && uint32(aurHolder->GetStackAmount() + 1) == 1) + { + CastSpell(this, 72521, true); // First Effect + } + else if (aurHolder && uint32(aurHolder->GetStackAmount() + 1) == 6) + { + RemoveAurasDueToSpell(72521); // Remove First Effect + CastSpell(this, 72523, true); // Add Second Effect + } + else if (aurHolder && uint32(aurHolder->GetStackAmount() + 1) >= aurHolder->GetSpellProto()->StackAmount) { RemoveAurasDueToSpell(71905); + RemoveAurasDueToSpell(72523); // Remove Second Effect CastSpell(this, 71904, true); // Chaos Bane return SPELL_AURA_PROC_OK; } -- 1.7.0.2
  18. Description of the feature? Fix typos in the engineering skillname (SKILL_ENGINERING -> SKILL_ENGINEERING) For which repository revision was the patch created? 10447 Is there a thread in the bug report section or at lighthouse? no Who has been writing this patch? me (Darkrulerz on github) From 94d03fa8682a83935bb73477de87e63dbb73260c Mon Sep 17 00:00:00 2001 From: Dark <[email protected]> Date: Sun, 5 Sep 2010 21:05:45 +0200 Subject: [PATCH] Fix typos (ENGINERING -> ENGINEERING) Signed-off-by: Dark <[email protected]> --- src/game/Creature.h | 2 +- src/game/SharedDefines.h | 6 +++--- src/game/SpellEffects.cpp | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/game/Creature.h b/src/game/Creature.h index 69d57e4..b2fb73c 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -141,7 +141,7 @@ struct CreatureInfo else if(type_flags & CREATURE_TYPEFLAGS_MININGLOOT) return SKILL_MINING; else if(type_flags & CREATURE_TYPEFLAGS_ENGINEERLOOT) - return SKILL_ENGINERING; + return SKILL_ENGINEERING; else return SKILL_SKINNING; // normal case } diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 609981a..5a38653 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -2007,7 +2007,7 @@ enum QuestSort QUEST_SORT_ROGUE = 162, QUEST_SORT_ALCHEMY = 181, QUEST_SORT_LEATHERWORKING = 182, - QUEST_SORT_ENGINERING = 201, + QUEST_SORT_ENGINEERING = 201, QUEST_SORT_TREASURE_MAP = 221, QUEST_SORT_SUNKEN_TEMPLE_OLD = 241, QUEST_SORT_HUNTER = 261, @@ -2109,7 +2109,7 @@ enum SkillType SKILL_PET_IMP = 188, SKILL_PET_FELHUNTER = 189, SKILL_TAILORING = 197, - SKILL_ENGINERING = 202, + SKILL_ENGINEERING = 202, SKILL_PET_SPIDER = 203, SKILL_PET_VOIDWALKER = 204, SKILL_PET_SUCCUBUS = 205, @@ -2229,7 +2229,7 @@ inline uint32 SkillByQuestSort(int32 QuestSort) case QUEST_SORT_BLACKSMITHING: return SKILL_BLACKSMITHING; case QUEST_SORT_ALCHEMY: return SKILL_ALCHEMY; case QUEST_SORT_LEATHERWORKING: return SKILL_LEATHERWORKING; - case QUEST_SORT_ENGINERING: return SKILL_ENGINERING; + case QUEST_SORT_ENGINEERING: return SKILL_ENGINEERING; case QUEST_SORT_TAILORING: return SKILL_TAILORING; case QUEST_SORT_COOKING: return SKILL_COOKING; case QUEST_SORT_FIRST_AID: return SKILL_FIRST_AID; diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index f3dc552..aa0c162 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3250,7 +3250,7 @@ void Spell::EffectHeal(SpellEffectIndex /*eff_idx*/) else if ((m_spellInfo->Id == 67486 || m_spellInfo->Id == 67489) && unitTarget->GetTypeId() == TYPEID_PLAYER) { Player* player = (Player*)unitTarget; - if (player->HasSkill(SKILL_ENGINERING)) + if (player->HasSkill(SKILL_ENGINEERING)) addhealth += int32(addhealth * 0.25); } @@ -3556,7 +3556,7 @@ void Spell::EffectEnergize(SpellEffectIndex eff_idx) if (unitTarget->GetTypeId() == TYPEID_PLAYER) { Player* player = (Player*)unitTarget; - if (player->HasSkill(SKILL_ENGINERING)) + if (player->HasSkill(SKILL_ENGINEERING)) damage += int32(damage * 0.25); } break; @@ -4349,9 +4349,9 @@ void Spell::DoSummonWild(SpellEffectIndex eff_idx, uint32 forceFaction) if (m_caster->GetTypeId()==TYPEID_PLAYER && m_CastItem) { ItemPrototype const *proto = m_CastItem->GetProto(); - if (proto && proto->RequiredSkill == SKILL_ENGINERING) + if (proto && proto->RequiredSkill == SKILL_ENGINEERING) { - uint16 skill202 = ((Player*)m_caster)->GetSkillValue(SKILL_ENGINERING); + uint16 skill202 = ((Player*)m_caster)->GetSkillValue(SKILL_ENGINEERING); if (skill202) level = skill202/5; } @@ -4413,9 +4413,9 @@ void Spell::DoSummonGuardian(SpellEffectIndex eff_idx, uint32 forceFaction) if (m_caster->GetTypeId() == TYPEID_PLAYER && m_CastItem) { ItemPrototype const *proto = m_CastItem->GetProto(); - if (proto && proto->RequiredSkill == SKILL_ENGINERING) + if (proto && proto->RequiredSkill == SKILL_ENGINEERING) { - uint16 skill202 = ((Player*)m_caster)->GetSkillValue(SKILL_ENGINERING); + uint16 skill202 = ((Player*)m_caster)->GetSkillValue(SKILL_ENGINEERING); if (skill202) { level = skill202 / 5; -- 1.7.0.2.msysgit.0
  19. Not everything, YTDB and UDB will likely truncate the creature table and all other spawns (with some exceptions perhaps) cause most of it will be wrong after the switch creature_template etc. will likely be kept as most NPCs will still exist (perhaps some update to health or something...)
  20. Make sure you got Vmaps turned on
  21. ^ that's what you can do, or put the guard scripts back into the SD2 project file for your Visual Studio version (vc100 files for VS2010) dont know the reason why they removed it but there should be a good reason for it so be cautious
  22. Cyberium's standard Ahbot is the safest to go with, his new_ahbot branch is the BEST to go with Xeross is still a bit behind on features for as far as i know
×
×
  • 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