You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(35) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(354) |
Feb
(363) |
Mar
(542) |
Apr
(494) |
May
(232) |
Jun
(349) |
Jul
(221) |
Aug
(154) |
Sep
(124) |
Oct
(89) |
Nov
(121) |
Dec
(133) |
2003 |
Jan
(279) |
Feb
(490) |
Mar
(448) |
Apr
(295) |
May
(151) |
Jun
(209) |
Jul
(367) |
Aug
(371) |
Sep
(284) |
Oct
(492) |
Nov
(540) |
Dec
(240) |
2004 |
Jan
(381) |
Feb
(497) |
Mar
(556) |
Apr
(394) |
May
(332) |
Jun
(263) |
Jul
(533) |
Aug
(348) |
Sep
(398) |
Oct
(520) |
Nov
(511) |
Dec
(703) |
2005 |
Jan
(700) |
Feb
(354) |
Mar
(456) |
Apr
(300) |
May
(444) |
Jun
(405) |
Jul
(312) |
Aug
(480) |
Sep
(302) |
Oct
(660) |
Nov
(448) |
Dec
(658) |
2006 |
Jan
(543) |
Feb
(313) |
Mar
(293) |
Apr
(293) |
May
(244) |
Jun
(256) |
Jul
(257) |
Aug
(194) |
Sep
(64) |
Oct
(174) |
Nov
(340) |
Dec
(250) |
2007 |
Jan
(281) |
Feb
(350) |
Mar
(245) |
Apr
(348) |
May
(262) |
Jun
(188) |
Jul
(233) |
Aug
(303) |
Sep
(426) |
Oct
(470) |
Nov
(181) |
Dec
(242) |
2008 |
Jan
(176) |
Feb
(268) |
Mar
(253) |
Apr
(136) |
May
(198) |
Jun
(207) |
Jul
(134) |
Aug
(166) |
Sep
(65) |
Oct
(113) |
Nov
(248) |
Dec
(222) |
2009 |
Jan
(170) |
Feb
(163) |
Mar
(247) |
Apr
(225) |
May
(202) |
Jun
(84) |
Jul
(281) |
Aug
(138) |
Sep
(292) |
Oct
(118) |
Nov
(140) |
Dec
(278) |
2010 |
Jan
(304) |
Feb
(219) |
Mar
(110) |
Apr
(88) |
May
(94) |
Jun
(53) |
Jul
(74) |
Aug
(98) |
Sep
(63) |
Oct
(90) |
Nov
(134) |
Dec
(216) |
2011 |
Jan
(166) |
Feb
(179) |
Mar
(94) |
Apr
(82) |
May
(140) |
Jun
(141) |
Jul
(92) |
Aug
(56) |
Sep
(35) |
Oct
(38) |
Nov
(75) |
Dec
(187) |
2012 |
Jan
(96) |
Feb
(49) |
Mar
(36) |
Apr
(111) |
May
(87) |
Jun
(28) |
Jul
(40) |
Aug
(15) |
Sep
(28) |
Oct
(23) |
Nov
(18) |
Dec
(32) |
2013 |
Jan
(44) |
Feb
(53) |
Mar
(32) |
Apr
(46) |
May
(16) |
Jun
(10) |
Jul
(19) |
Aug
(31) |
Sep
(55) |
Oct
(110) |
Nov
(105) |
Dec
(108) |
2014 |
Jan
(76) |
Feb
(70) |
Mar
(59) |
Apr
(125) |
May
(28) |
Jun
(9) |
Jul
(10) |
Aug
(20) |
Sep
(34) |
Oct
(52) |
Nov
(29) |
Dec
(17) |
2015 |
Jan
(18) |
Feb
(17) |
Mar
(17) |
Apr
|
May
(1) |
Jun
(8) |
Jul
(6) |
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
(2) |
2016 |
Jan
(10) |
Feb
(42) |
Mar
(65) |
Apr
(44) |
May
(23) |
Jun
(9) |
Jul
(4) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(3) |
Dec
(24) |
2017 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(3) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2020 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2024 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
From: <rav...@us...> - 2016-12-10 00:29:11
|
Revision: 9972 http://sourceforge.net/p/planeshift/code/9972 Author: ravna-ps Date: 2016-12-10 00:29:09 +0000 (Sat, 10 Dec 2016) Log Message: ----------- Fixed: (WC) ka_script listing is now sorted by "name", case insensitive, ascending. Modified Paths: -------------- www/webconsole-new/npcs/ka_scripts.php Modified: www/webconsole-new/npcs/ka_scripts.php =================================================================== --- www/webconsole-new/npcs/ka_scripts.php 2016-12-09 21:58:49 UTC (rev 9971) +++ www/webconsole-new/npcs/ka_scripts.php 2016-12-10 00:29:09 UTC (rev 9972) @@ -12,19 +12,26 @@ $result = mysql_query2($query); echo '<table border="1">'; echo '<tr><th>Name</th><th>Action</th></tr>'; + $results = array(); while ($row = fetchSqlAssoc($result)) { $pos1 = strpos($row['script'], "\n")+1; $string = substr($row['script'], $pos1); $pos2 = strpos($string, ":"); - $name = substr($string, 0, $pos2); - echo '<tr><td>'.htmlentities($name).'</td>'; - echo '<td><a href="./index.php?do=ka_scripts&sub=Read&areaid='.$row['id'].'">Read</a>'; - echo '<br/><a href="./index.php?do=validatequest&id=-1&script_id='.$row['id'].'">Validate</a>'; + $name = substr($string, 0, $pos2); + $results[$row['id']] = $name; + } + asort($results, SORT_NATURAL | SORT_FLAG_CASE); // sort results by value, asc. + foreach ($results as $rId => $rName) + { + + echo '<tr><td>'.htmlentities($rName).'</td>'; + echo '<td><a href="./index.php?do=ka_scripts&sub=Read&areaid='.$rId.'">Read</a>'; + echo '<br/><a href="./index.php?do=validatequest&id=-1&script_id='.$rId.'">Validate</a>'; if (checkaccess('npcs', 'edit')) { - echo '<br/><a href="./index.php?do=ka_scripts&sub=Edit&areaid='.$row['id'].'">Edit</a>'; - echo '<br/><a href="./index.php?do=ka_scripts&sub=Delete&areaid='.$row['id'].'">Delete</a>'; + echo '<br/><a href="./index.php?do=ka_scripts&sub=Edit&areaid='.$rId.'">Edit</a>'; + echo '<br/><a href="./index.php?do=ka_scripts&sub=Delete&areaid='.$rId.'">Delete</a>'; } echo '</td></tr>'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-12-09 21:58:51
|
Revision: 9971 http://sourceforge.net/p/planeshift/code/9971 Author: ravna-ps Date: 2016-12-09 21:58:49 +0000 (Fri, 09 Dec 2016) Log Message: ----------- Fixed: (WC) factions list now also shows ID. Modified Paths: -------------- www/webconsole-new/rules/factions.php Modified: www/webconsole-new/rules/factions.php =================================================================== --- www/webconsole-new/rules/factions.php 2016-12-09 21:52:22 UTC (rev 9970) +++ www/webconsole-new/rules/factions.php 2016-12-09 21:58:49 UTC (rev 9971) @@ -47,13 +47,14 @@ if (sqlNumRows($result) == 0 ){ echo 'No Skills Found!'; } - echo '<table border="1"><tr><th>Faction</th><th>Description</th><th>Character</th><th>Weight</th>'; + echo '<table border="1"><tr><th>ID</th><th>Faction</th><th>Description</th><th>Character</th><th>Weight</th>'; if (checkaccess('npcs', 'edit')){ echo '<th>Actions</th>'; } echo '</tr>'; while ($row = fetchSqlAssoc($result)){ echo '<tr>'; + echo '<td>'.$row['id'].'</td>'; echo '<td>'.$row['faction_name'].'</td>'; echo '<td>'.$row['faction_description'].'</td>'; echo '<td>'.$row['faction_character'].'</td>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-12-09 21:52:24
|
Revision: 9970 http://sourceforge.net/p/planeshift/code/9970 Author: ravna-ps Date: 2016-12-09 21:52:22 +0000 (Fri, 09 Dec 2016) Log Message: ----------- Fixed: (WC) quest validator does no longer warn about "require variable" variables not starting with Quest_ Modified Paths: -------------- www/webconsole-new/quests/validatequest.php Modified: www/webconsole-new/quests/validatequest.php =================================================================== --- www/webconsole-new/quests/validatequest.php 2016-12-07 17:15:05 UTC (rev 9969) +++ www/webconsole-new/quests/validatequest.php 2016-12-09 21:52:22 UTC (rev 9970) @@ -1381,10 +1381,6 @@ append_log("Parse Error: No require variable name (check for double spaces) at line $line_number"); return; } - if (strncmp($parameters[0], 'Quest_', 6) !== 0) // case sensitive check - { - append_log("Warning: Variables for quests should start with 'Quest_' at line $line_number"); - } if (count($parameters) == 1) { return; // valid, we already checked empty/other cases above. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-12-07 17:15:07
|
Revision: 9969 http://sourceforge.net/p/planeshift/code/9969 Author: ravna-ps Date: 2016-12-07 17:15:05 +0000 (Wed, 07 Dec 2016) Log Message: ----------- Added: (WC) list lootmodifiers can now also sort by probability Modified Paths: -------------- www/webconsole-new/rules/lootmodifiers.php Modified: www/webconsole-new/rules/lootmodifiers.php =================================================================== --- www/webconsole-new/rules/lootmodifiers.php 2016-12-07 16:40:58 UTC (rev 9968) +++ www/webconsole-new/rules/lootmodifiers.php 2016-12-07 17:15:05 UTC (rev 9969) @@ -23,6 +23,9 @@ case 'modifier_type': $query .= ' ORDER BY modifier_type, name'; break; + case 'probability': + $query .= ' ORDER BY modifier_type, probability'; + break; default: $query .= ' ORDER BY modifier_type, name'; } @@ -33,7 +36,8 @@ } $result = mysql_query2($query); echo '<table border="1"><tr><th>ID</th><th><a href="./index.php?do=listlootmodifiers&sort=modifier_type">Modifier Type</a></th>'; - echo '<th><a href="./index.php?do=listlootmodifiers&sort=name">Name</a></th><th>Probability</th>'; + echo '<th><a href="./index.php?do=listlootmodifiers&sort=name">Name</a></th><th>'; + echo '<a href="./index.php?do=listlootmodifiers&sort=probability">Probability</a></th>'; echo '<th>Cost Modifier</th><th>Mesh</th><th>Icon</th><th>Not Usable With</th><th>actions</th></tr>'; while ($row = fetchSqlAssoc($result)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-12-07 16:41:00
|
Revision: 9968 http://sourceforge.net/p/planeshift/code/9968 Author: ravna-ps Date: 2016-12-07 16:40:58 +0000 (Wed, 07 Dec 2016) Log Message: ----------- Fixed: (WC) list lootmodifiers now also displays ID's. Also fixed various XHTML issues. Modified Paths: -------------- www/webconsole-new/rules/lootmodifiers.php Modified: www/webconsole-new/rules/lootmodifiers.php =================================================================== --- www/webconsole-new/rules/lootmodifiers.php 2016-12-07 16:07:30 UTC (rev 9967) +++ www/webconsole-new/rules/lootmodifiers.php 2016-12-07 16:40:58 UTC (rev 9968) @@ -32,19 +32,21 @@ $query .= ' ORDER BY modifier_type, name'; } $result = mysql_query2($query); - echo '<table border="1"><tr><th><a href="./index.php?do=listlootmodifiers&sort=modifier_type">Modifier Type</a></th>'; + echo '<table border="1"><tr><th>ID</th><th><a href="./index.php?do=listlootmodifiers&sort=modifier_type">Modifier Type</a></th>'; echo '<th><a href="./index.php?do=listlootmodifiers&sort=name">Name</a></th><th>Probability</th>'; echo '<th>Cost Modifier</th><th>Mesh</th><th>Icon</th><th>Not Usable With</th><th>actions</th></tr>'; while ($row = fetchSqlAssoc($result)) { - echo '<tr><td>'.$row['modifier_type'].'</td>'; + echo '<tr>'; + echo '<td>'.$row['id'].'</td>'; + echo '<td>'.$row['modifier_type'].'</td>'; echo '<td>'.$row['name'].'</td>'; echo '<td>'.$row['probability'].'</td>'; echo '<td>'.$row['cost_modifier'].'</td>'; echo '<td>'.$row['mesh'].'</td>'; echo '<td>'.$row['icon'].'</td>'; echo '<td>'.$row['not_usable_with'].'</td>'; - echo '<td><form action="./index.php?do=editlootmodifiers" method="post"><input type="hidden" name="id" value="'.$row['id'].'" />'; + echo '<td><form action="./index.php?do=editlootmodifiers" method="post"><div><input type="hidden" name="id" value="'.$row['id'].'" />'; if (checkaccess('crafting', 'edit')) { echo '<input type="submit" name="action" value="Edit" />'; @@ -53,15 +55,16 @@ echo '<input type="submit" name="action" value="Delete" />'; } } - echo '</form></td>'; + echo '</div></form></td>'; echo '</tr>'; } echo '</table>'; - echo '<hr>'; + echo '<hr />'; if (checkaccess('crafting', 'create')) { echo '<h3> Add new loot modifier: </h3>'; - echo '<table><form action="./index.php?do=editlootmodifiers" method="post">'; + echo '<form action="./index.php?do=editlootmodifiers" method="post">'; + echo '<table>'; echo '<tr><td>Modifier Type: </td><td><select name="modifier_type"><option value="prefix">Prefix</option><option value="suffix">Suffix</option><option value="adjective">Adjective</option></select></td></tr>'; echo '<tr><td>Name: </td><td><input type="text" name="name" /></td></tr>'; echo '<tr><td>Effect: </td><td><textarea name="effect" cols="80" rows="5"></textarea></td></tr>'; @@ -73,7 +76,7 @@ echo '<tr><td>Not Usable With: </td><td><input type="text" name="not_usable_with" /></td></tr>'; echo '<tr><td>Equip Script: </td><td><textarea name="equip_script" cols="80" rows="5"></textarea></td></tr>'; echo '<tr><td colspan="2"><input type="submit" name="action" value="Create" /></td></tr>'; - echo '</form></table>'; + echo '</table></form>'; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-12-07 16:07:31
|
Revision: 9967 http://sourceforge.net/p/planeshift/code/9967 Author: ravna-ps Date: 2016-12-07 16:07:30 +0000 (Wed, 07 Dec 2016) Log Message: ----------- fixed: the <item> tag in progression events can now use variables/math expressions in the randomlevel and randomcost variables. added: the <item> tag can now take an itemquality variable (int). This can be a variable/math expression too. added: the <item> tag can now take prefixid, suffixid and adjectiveid as parameters (ints), which are applied to the created item (after random modifiers if any, overwriting them as applicable). fixed: removed an old debug statement in lootrandomizer Modified Paths: -------------- trunk/src/server/lootrandomizer.cpp trunk/src/server/scripting.cpp Modified: trunk/src/server/lootrandomizer.cpp =================================================================== --- trunk/src/server/lootrandomizer.cpp 2016-12-06 16:49:39 UTC (rev 9966) +++ trunk/src/server/lootrandomizer.cpp 2016-12-07 16:07:30 UTC (rev 9967) @@ -314,7 +314,6 @@ continue; } - printf("found\n"); item->AddLootModifier(lootModifier->id, lootModifier->mod_id); found = true; } Modified: trunk/src/server/scripting.cpp =================================================================== --- trunk/src/server/scripting.cpp 2016-12-06 16:49:39 UTC (rev 9966) +++ trunk/src/server/scripting.cpp 2016-12-07 16:07:30 UTC (rev 9967) @@ -3383,6 +3383,12 @@ * @code * <item aim="Target" name="Tria" location="inventory" count="5" /> * @endcode + * Optional parameters in the item tag are: + * itemquality (can be an int or an expression), randomize (boolean), randomlevel (int or expression, appears to get ignored by LootRandomizer::RandomizeItem -dec-2016), randomcost (int or expression) + * Notice randomize is required to be true before the other 2 take effect. + * adjectiveid, suffixid and prefixid (ints) are used to give specific modifiers to specific slots, these are ignored if they are not valid for the item + * but are still applied if the id does not match the slot (a suffixid containing the id of a prefix, etc), though only the last one to land in that slot will be saved. + * Finally, they overwrite the randomly given modifiers in slots of the same type. (if any) */ class ItemOp : public ImperativeAim { @@ -3413,10 +3419,16 @@ } placeOnGround = location == "ground"; - //loads data about the randomization status of the item. + //loads optional data about the randomization status of the item. randomize = node->GetAttributeValueAsBool("randomize"); - randomCost = node->GetAttributeValueAsInt("randomcost", 1000); - randomLevel = node->GetAttributeValueAsInt("randomlevel", 3); + randomCostExpr = MathExpression::Create(node->GetAttributeValue("randomcost", "1000")); + randomLevelExpr = MathExpression::Create(node->GetAttributeValue("randomlevel", "3")); + // load optional quality + itemQualityExpr = MathExpression::Create(node->GetAttributeValue("itemquality", "0")); + // load optional modifiers + adjectiveIdExpr = MathExpression::Create(node->GetAttributeValue("adjectiveid", "0")); + suffixIdExpr = MathExpression::Create(node->GetAttributeValue("suffixid", "0")); + prefixIdExpr = MathExpression::Create(node->GetAttributeValue("prefixid", "0")); return !name.IsEmpty() && count && ImperativeAim::Load(node); } @@ -3428,12 +3440,21 @@ Error2("Error while executing ItemOp script giving item %s, invalid target character",name.GetData()); return; } + int stackCount = count->Evaluate(env); if(stackCount <= 0) { return; } + // evaluate the following vars to see if they contained math-scripts and/or variables. + randomLevel = randomLevelExpr->Evaluate(env); + randomCost = randomCostExpr->Evaluate(env); + itemQuality = itemQualityExpr->Evaluate(env); + suffixId = suffixIdExpr->Evaluate(env); + prefixId = prefixIdExpr->Evaluate(env); + adjectiveId = adjectiveIdExpr->Evaluate(env); + if(placeOnGround) { psItem* iteminstance = CreateItem(true, stackCount); @@ -3499,10 +3520,24 @@ item->SetStackCount(stackCount); } - //if we have to randomize the item we do it now. - if(randomize) - cacheManager->RandomizeItem(item, randomCost, randomLevel); + if (randomize) + { + cacheManager->RandomizeItem(item, randomCost, randomLevel); + } + if (itemQuality) + { + item->SetItemQuality(itemQuality); + } + if (suffixId || prefixId || adjectiveId) + { + // adding a modifier with ID 0 will be ignored, so we can safely add all 3. + csArray<uint32_t> modsToAdd; + modsToAdd.Push(suffixId); + modsToAdd.Push(prefixId); + modsToAdd.Push(adjectiveId); + cacheManager->getLootRandomizer()->SetModifiers(item, modsToAdd); + } item->SetLoaded(); // Item is fully created @@ -3512,8 +3547,18 @@ protected: csString name; bool randomize; ///< If true it will randomize the item upon creation. - int randomCost; ///< The maximum allowed cost for the item. - int randomLevel; ///< The amount of modifiers allowed + MathExpression* randomCostExpr; ///< The maximum allowed cost for the item. + MathExpression* randomLevelExpr; ///< The amount of modifiers allowed + MathExpression* itemQualityExpr; ///< specify item quality. + MathExpression* prefixIdExpr; ///< If given, use this specific ID instead of the random one (if any, if none, just apply this). + MathExpression* suffixIdExpr; ///< If given, use this specific ID instead of the random one (if any, if none, just apply this). + MathExpression* adjectiveIdExpr; ///< If given, use this specific ID instead of the random one (if any, if none, just apply this). + int randomLevel; + int randomCost; + int itemQuality; + int suffixId; + int prefixId; + int adjectiveId; MathExpression* count; bool placeOnGround; CacheManager* cacheManager; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-12-06 16:49:42
|
Revision: 9966 http://sourceforge.net/p/planeshift/code/9966 Author: ravna-ps Date: 2016-12-06 16:49:39 +0000 (Tue, 06 Dec 2016) Log Message: ----------- Fixed: (WC) race info page can now delete spawn points that contain decimal fractions (aka floating points) in any of their fields. Also fixed various XHTML issues. Modified Paths: -------------- www/webconsole-new/rules/raceinfo.php Modified: www/webconsole-new/rules/raceinfo.php =================================================================== --- www/webconsole-new/rules/raceinfo.php 2016-12-04 22:13:15 UTC (rev 9965) +++ www/webconsole-new/rules/raceinfo.php 2016-12-06 16:49:39 UTC (rev 9966) @@ -10,7 +10,7 @@ $yrot = escapeSqlString($_POST['yrot']); $range = escapeSqlString($_POST['range']); $sec = escapeSqlString($_POST['sec']); - $query = "DELETE FROM race_spawns WHERE x='$x' AND y='$y' AND z='$z' AND yrot='$yrot' AND `range`='$range' AND sector_id='$sec' AND raceid='$raceid' LIMIT 1"; + $query = "DELETE FROM race_spawns WHERE CAST(x AS DECIMAL)=CAST('$x' AS DECIMAL) AND CAST(z AS DECIMAL)=CAST('$z' AS DECIMAL) AND CAST(y AS DECIMAL)=CAST('$y' AS DECIMAL) AND CAST(yrot AS DECIMAL)=CAST('$yrot' AS DECIMAL) AND CAST(`range` AS DECIMAL)=CAST('$range' AS DECIMAL) AND sector_id='$sec' AND raceid='$raceid' LIMIT 1"; $result = mysql_query2($query); echo '<p class="error">Update Successful</p>'; unset($_POST); @@ -69,13 +69,13 @@ $range = escapeSqlString($_POST['range']); $raceid = escapeSqlString($_POST['id']); $sec = escapeSqlString($_POST['sec']); - $query = "SELECT r.name, r.sex, p.x, p.y, p.z, s.name AS sector FROM race_spawns AS p LEFT JOIN race_info AS r ON r.id=p.raceid LEFT JOIN sectors AS s ON s.id=p.sector_id WHERE p.sector_id='$sec' AND p.raceid='$raceid' AND p.x='$x' AND p.z='$z' AND p.y='$y' AND p.yrot='$yrot' AND p.range='$range'"; + $query = "SELECT r.name, r.sex, p.x, p.y, p.z, s.name AS sector FROM race_spawns AS p LEFT JOIN race_info AS r ON r.id=p.raceid LEFT JOIN sectors AS s ON s.id=p.sector_id WHERE p.sector_id='$sec' AND p.raceid='$raceid' AND CAST(p.x AS DECIMAL)=CAST('$x' AS DECIMAL) AND CAST(p.z AS DECIMAL)=CAST('$z' AS DECIMAL) AND CAST(p.y AS DECIMAL)=CAST('$y' AS DECIMAL) AND CAST(p.yrot AS DECIMAL)=CAST('$yrot' AS DECIMAL) AND CAST(p.range AS DECIMAL)=CAST('$range' AS DECIMAL)"; $result = mysql_query2($query); if (sqlNumRows($result) > 0){ $row = fetchSqlAssoc($result); echo 'You are about to delete the following Spawn-Point:<br/>'.$row['name'].' '.$row['sex'].': '.$row['x'].' / '.$row['y'].' / '.$row['z'].' / '.$row['sector'].' yrot: '.$yrot.' range: '.$range.'<br/>'; echo '<form action="./index.php?do=raceinfo" method="post">'; - echo '<input type="hidden" name="x" value="'.$x.'" />'; + echo '<div><input type="hidden" name="x" value="'.$x.'" />'; echo '<input type="hidden" name="y" value="'.$y.'" />'; echo '<input type="hidden" name="z" value="'.$z.'" />'; echo '<input type="hidden" name="yrot" value="'.$yrot.'" />'; @@ -83,23 +83,23 @@ echo '<input type="hidden" name="id" value="'.$raceid.'" />'; echo '<input type="hidden" name="sec" value="'.$sec.'" />'; echo '<input type="submit" name="commit" value="Confirm Spawn Point Delete" />'; - echo '</form>'; + echo '</div></form>'; } }else if ($_POST['action'] == "Edit Values"){ $id = escapeSqlString($_POST['id']); $query = "SELECT * FROM race_info WHERE id='$id'"; $result = mysql_query2($query); $row = fetchSqlAssoc($result); - echo '<form action="./index.php?do=raceinfo" method="post"><input type="hidden" name="id" value="'.$id.'" />'; + echo '<form action="./index.php?do=raceinfo" method="post">'; echo '<table border="1"><tr><th>Field</th><th>Value</th></tr>'; echo '<tr><td>Race:</td><td><input type="text" name="name" value="'.$row['name'].'"/></td></tr>'; echo '<tr><td>Sex:</td><td><select name="sex">'; if ($row['sex'] == 'M'){ - echo '<option value="M" selected="true">Male</option><option value="F">Female</option><option value="N">Neuter</option>'; + echo '<option value="M" selected="selected">Male</option><option value="F">Female</option><option value="N">Neuter</option>'; }else if ($row['sex'] == 'F'){ - echo '<option value="M">Male</option><option value="F" selected="true">Female</option><option value="N">Neuter</option>'; + echo '<option value="M">Male</option><option value="F" selected="selected">Female</option><option value="N">Neuter</option>'; }else if ($row['sex'] == 'N'){ - echo '<option value="M">Male</option><option value="F">Female</option><option value="N" selected="true">Neuter</option>'; + echo '<option value="M">Male</option><option value="F">Female</option><option value="N" selected="selected">Neuter</option>'; } echo '</select></td></tr>'; echo '<tr><td>Size X:</td><td><input type="text" name="size_x" value="'.$row['size_x'].'"/></td></tr>'; @@ -124,12 +124,13 @@ echo '<tr><td>Cloak:</td><td><input type="text" name="cloak" value="'.$row['cloak'].'"/></td></tr>'; echo '<tr><td>Speed modifier:</td><td><input type="text" name="speed_modifier" value="'.$row['speed_modifier'].'"/></td></tr>'; echo '<tr><td>Scale:</td><td><input type="text" name="scale" value="'.$row['scale'].'"/></td></tr>'; - echo '</table><input type="submit" name="commit" value="Confirm Update" />'; + echo '<tr><td colspan="2"><input type="hidden" name="id" value="'.$id.'" /><input type="submit" name="commit" value="Confirm Update" /></td></tr>'; + echo '</table>'; echo '</form>'; }else if ($_POST['action'] == "Add Spawn Point"){ $id = escapeSqlString($_POST['id']); $Sectors = PrepSelect('sectorid'); - echo '<form action="./index.php?do=raceinfo" method="post"><input type="hidden" name="id" value="'.$id.'" />'; + echo '<form action="./index.php?do=raceinfo" method="post">'; echo '<table border="1"><tr><th>Field</th><th>Value</th></tr>'; echo '<tr><td>Sector:</td><td>'.DrawSelectBox('sectorid', $Sectors, 'sector_id', '').'</td></tr>'; echo '<tr><td>X:</td><td><input type="text" name="x"/></td></tr>'; @@ -137,7 +138,8 @@ echo '<tr><td>Z:</td><td><input type="text" name="z"/></td></tr>'; echo '<tr><td>yrot:</td><td><input type="text" name="yrot"/></td></tr>'; echo '<tr><td>Range:</td><td><input type="text" name="range"/></td></tr>'; - echo '</table><input type="submit" name="commit" value="Add Spawn Point"/>'; + echo '<tr><td colspan="2"><input type="hidden" name="id" value="'.$id.'" /><input type="submit" name="commit" value="Add Spawn Point"/></td></tr>'; + echo '</table>'; echo '</form>'; }else{ } @@ -167,7 +169,7 @@ if (checkaccess('natres', 'edit')){ echo '<th>Actions</th>'; } - echo '</tr>'; + echo '</tr>'."\n"; $Alt = FALSE; while ($row = fetchSqlAssoc($result)){ $Alt = !$Alt; @@ -213,11 +215,11 @@ $angle = ($spawn['yrot']*180)/3.14159; echo '<td>'.$angle.'</td>'; echo '<td>'.$spawn['range'].'</td>'; - echo '<td>'.$spawn['sector_name'].'</td>'; + echo '<td>'.$spawn['sector_name'].'</td>'."\n"; if (checkaccess('natres','edit')){ echo '<td>'; echo '<form action="./index.php?do=raceinfo" method="post">'; - echo '<input type="hidden" name="id" value="'.$row['id'].'" />'; + echo '<div><input type="hidden" name="id" value="'.$row['id'].'" />'; echo '<input type="hidden" name="x" value="'.$spawn['x'].'" />'; echo '<input type="hidden" name="y" value="'.$spawn['y'].'" />'; echo '<input type="hidden" name="z" value="'.$spawn['z'].'" />'; @@ -225,9 +227,9 @@ echo '<input type="hidden" name="range" value="'.$spawn['range'].'" />'; echo '<input type="hidden" name="sec" value="'.$spawn['sector_id'].'" />'; echo '<input type="submit" name="action" value="Delete" />'; - echo '</form></td>'; + echo '</div></form></td>'."\n"; } - echo '</tr>'; + echo '</tr>'."\n"; } echo '</table>'; }else{ @@ -237,14 +239,14 @@ if (checkaccess('natres', 'edit')){ echo '<td>'; echo '<form action="./index.php?do=raceinfo" method="post">'; - echo '<input type="hidden" name="id" value="'.$row['id'].'" />'; + echo '<div><input type="hidden" name="id" value="'.$row['id'].'" />'; echo '<input type="submit" name="action" value="Edit Values" />'; echo '<input type="submit" name="action" value="Add Spawn Point" />'; - echo '</form></td>'; + echo '</div></form></td>'."\n"; } echo '</tr>'; } - echo '</table>'; + echo '</table>'."\n"; } }else{ echo '<p class="error">You are not authorized to use these functions</p>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-12-04 22:13:17
|
Revision: 9965 http://sourceforge.net/p/planeshift/code/9965 Author: ravna-ps Date: 2016-12-04 22:13:15 +0000 (Sun, 04 Dec 2016) Log Message: ----------- Fixed: (WC) Faction page can now edit the name field. Also fixed some XHTML errors. Modified Paths: -------------- www/webconsole-new/rules/factions.php Modified: www/webconsole-new/rules/factions.php =================================================================== --- www/webconsole-new/rules/factions.php 2016-12-01 23:24:09 UTC (rev 9964) +++ www/webconsole-new/rules/factions.php 2016-12-04 22:13:15 UTC (rev 9965) @@ -4,10 +4,11 @@ if (isset($_POST['commit']) && checkaccess('npcs', 'edit')){ if ($_POST['commit'] == "Commit Edit"){ $id = escapeSqlString($_POST['id']); + $faction_name = escapeSqlString($_POST['faction_name']); $faction_description = escapeSqlString($_POST['faction_description']); $faction_character = escapeSqlString($_POST['faction_character']); $faction_weight = escapeSqlString($_POST['faction_weight']); - $query = "UPDATE factions SET faction_description='$faction_description', faction_character='$faction_character', faction_weight='$faction_weight' WHERE id='$id'"; + $query = "UPDATE factions SET faction_name='$faction_name', faction_description='$faction_description', faction_character='$faction_character', faction_weight='$faction_weight' WHERE id='$id'"; $result = mysql_query2($query); unset($_POST); echo '<p class="error">Update Successful</p>'; @@ -26,14 +27,13 @@ $result = mysql_query2($query); $row = fetchSqlAssoc($result); echo '<form action="./index.php?do=factions" method="post">'; - echo '<input type="hidden" name="id" value="'.$id.'" />'; echo '<table border="1"><tr><th>Field</th><th>Value</th></tr>'; - echo '<tr><td>Name:</td><td>'.$row['faction_name'].'</td></tr>'; - echo '<tr><td>Description:</td><td><textarea name="faction_description" row="4" cols="40">'.$row['faction_description'].'</textarea></td></tr>'; - echo '<tr><td>Character:</td><td><textarea name="faction_character" row="4" cols="40">'.$row['faction_character'].'</textarea></td></tr>'; + echo '<tr><td>Name:</td><td><input type="hidden" name="id" value="'.$id.'" /><input type="text" name="faction_name" value="'.$row['faction_name'].'" /></td></tr>'; + echo '<tr><td>Description:</td><td><textarea name="faction_description" rows="4" cols="40">'.$row['faction_description'].'</textarea></td></tr>'; + echo '<tr><td>Character:</td><td><textarea name="faction_character" rows="4" cols="40">'.$row['faction_character'].'</textarea></td></tr>'; echo '<tr><td>Weight:</td><td><input type="text" name="faction_weight" value="'.$row['faction_weight'].'" /></td></tr>'; + echo '<tr><td colspan="2"><input type="submit" name="commit" value="Commit Edit" /></td></tr>'; echo '</table>'; - echo '<input type="submit" name="commit" value="Commit Edit" />'; echo '</form>'; }else{ echo '<p class="error">Bad Action, returning to listing</p>'; @@ -61,8 +61,8 @@ if (checkaccess('npcs', 'edit')){ echo '<td>'; echo '<form action="./index.php?do=factions" method="post">'; - echo '<input type="hidden" name="id" value="'.$row['id'].'"/>'; - echo '<input type="submit" name="action" value="Edit" />'; + echo '<div><input type="hidden" name="id" value="'.$row['id'].'"/>'; + echo '<input type="submit" name="action" value="Edit" /></div>'; echo '</form></td>'; } echo '</tr>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-12-01 23:24:11
|
Revision: 9964 http://sourceforge.net/p/planeshift/code/9964 Author: ravna-ps Date: 2016-12-01 23:24:09 +0000 (Thu, 01 Dec 2016) Log Message: ----------- Fixed: You can no longer equip a 2h weapon in one hand if your other hand is already holding an item. Modified Paths: -------------- trunk/src/server/bulkobjects/pscharinventory.cpp Modified: trunk/src/server/bulkobjects/pscharinventory.cpp =================================================================== --- trunk/src/server/bulkobjects/pscharinventory.cpp 2016-11-23 16:23:49 UTC (rev 9963) +++ trunk/src/server/bulkobjects/pscharinventory.cpp 2016-12-01 23:24:09 UTC (rev 9964) @@ -545,7 +545,7 @@ INVENTORY_SLOT_NUMBER otherSlot = proposedSlot == PSCHARACTER_SLOT_RIGHTHAND ? PSCHARACTER_SLOT_LEFTHAND : PSCHARACTER_SLOT_RIGHTHAND; - if(proposedSlot == PSCHARACTER_SLOT_BOTHHANDS) + if(item->FitsInSlot(PSCHARACTER_SLOT_BOTHHANDS)) { psItem *other = GetInventoryItem(otherSlot); if(other && other != item) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-11-23 16:23:51
|
Revision: 9963 http://sourceforge.net/p/planeshift/code/9963 Author: ravna-ps Date: 2016-11-23 16:23:49 +0000 (Wed, 23 Nov 2016) Log Message: ----------- Process name can now be changed in edit process (processes should be linked by ID/sub-id anyway). Modified Paths: -------------- www/webconsole-new/crafting/process.php Modified: www/webconsole-new/crafting/process.php =================================================================== --- www/webconsole-new/crafting/process.php 2016-11-13 00:26:56 UTC (rev 9962) +++ www/webconsole-new/crafting/process.php 2016-11-23 16:23:49 UTC (rev 9963) @@ -227,7 +227,7 @@ echo '<table><tr><td class="bold">Field</td><td class="bold">Value</td></tr>'; echo '<tr><td>Process ID:</td><td>'.$row['process_id'].'</td></tr>'; echo '<tr><td>SubProcess ID:</td><td>'.$row['subprocess_number'].'</td></tr>'; - echo '<tr><td>Name:</td><td><input type="hidden" name="name" value="'.htmlentities($row['name']).'" />'.htmlentities($row['name']).'</td></tr>'; + echo '<tr><td>Name:</td><td><input type="text" name="name" value="'.htmlentities($row['name']).'" /></td></tr>'; echo '<tr><td>Description:</td><td><input type="text" name="description" value="'.htmlentities($row['description']).'" /></td></tr>'; echo '<tr><td>Animation:</td><td><input type="text" name="animation" value="'.$row['animation'].'" /></td></tr>'; echo '<tr><td>Work Item:</td><td>'.DrawItemSelectBox('workitem_id', $row['workitem_id'], false, true).'</td></tr>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-11-13 00:26:58
|
Revision: 9962 http://sourceforge.net/p/planeshift/code/9962 Author: ravna-ps Date: 2016-11-13 00:26:56 +0000 (Sun, 13 Nov 2016) Log Message: ----------- Changed the set trait op to also check if a given name is actually an ID, in which case it uses that. Modified Paths: -------------- trunk/src/server/scripting.cpp Modified: trunk/src/server/scripting.cpp =================================================================== --- trunk/src/server/scripting.cpp 2016-11-13 00:17:19 UTC (rev 9961) +++ trunk/src/server/scripting.cpp 2016-11-13 00:26:56 UTC (rev 9962) @@ -2888,9 +2888,13 @@ while (ti.HasNext()) { psTrait* currTrait = ti.Next(); + csString id = csString(); + id.AppendFmt("%d", currTrait->uid); if (currTrait->gender == c->GetRaceInfo()->gender && currTrait->race == c->GetRaceInfo()->race && - currTrait->name.CompareNoCase(varName)) + (currTrait->name.CompareNoCase(varName) || + // check if the Name is actually an ID + id.CompareNoCase(varName))) { c->SetTraitForLocation(currTrait->location, currTrait); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-11-13 00:17:20
|
Revision: 9961 http://sourceforge.net/p/planeshift/code/9961 Author: ravna-ps Date: 2016-11-13 00:17:19 +0000 (Sun, 13 Nov 2016) Log Message: ----------- Changed the /settrait command to also try to match a given trait name to a trait ID like "/settrait me 5", which would try to set trait 5 to self if it is a valid trait for the race/gender. Modified Paths: -------------- trunk/src/server/adminmanager.cpp Modified: trunk/src/server/adminmanager.cpp =================================================================== --- trunk/src/server/adminmanager.cpp 2016-09-09 21:28:02 UTC (rev 9960) +++ trunk/src/server/adminmanager.cpp 2016-11-13 00:17:19 UTC (rev 9961) @@ -12680,9 +12680,13 @@ while(ti.HasNext()) { psTrait* currTrait = ti.Next(); + csString id = csString(); + id.AppendFmt("%d", currTrait->uid); if(currTrait->gender == target->GetRaceInfo()->gender && currTrait->race == target->GetRaceInfo()->race && - currTrait->name.CompareNoCase(data->traitName)) + (currTrait->name.CompareNoCase(data->traitName) || + // check if the Name is actually an ID + id.CompareNoCase(data->traitName))) { target->SetTraitForLocation(currTrait->location, currTrait); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-09-09 21:28:03
|
Revision: 9960 http://sourceforge.net/p/planeshift/code/9960 Author: ravna-ps Date: 2016-09-09 21:28:02 +0000 (Fri, 09 Sep 2016) Log Message: ----------- Changed quest discarding so completed quests can no longer be discarded (once completed, always completed), repeatable quests can still be completed again after any lockout timers expire. Modified Paths: -------------- trunk/src/server/bulkobjects/pscharquestmgr.cpp Modified: trunk/src/server/bulkobjects/pscharquestmgr.cpp =================================================================== --- trunk/src/server/bulkobjects/pscharquestmgr.cpp 2016-08-07 20:38:08 UTC (rev 9959) +++ trunk/src/server/bulkobjects/pscharquestmgr.cpp 2016-09-09 21:28:02 UTC (rev 9960) @@ -335,7 +335,7 @@ { CS_ASSERT(q); // Must not be NULL - if(force || (q->status != PSQUEST_DELETE && !q->GetQuest()->HasInfinitePlayerLockout())) + if(force || (q->status != PSQUEST_DELETE && !q->GetQuest()->HasInfinitePlayerLockout() && q->status != PSQUEST_COMPLETE)) { q->dirty = true; q->status = PSQUEST_DELETE; // discarded @@ -358,7 +358,7 @@ q->GetQuest()->GetName(),owner->GetCharName()); // Notify the player that he can't discard one-time quests psserver->SendSystemError(owner->GetActor()->GetClient()->GetClientNum(), - "You can't discard this quest, since it can be done just once!"); + "You can't discard this quest, because it is either a one time quest or a completed quest."); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-08-07 20:38:11
|
Revision: 9959 http://sourceforge.net/p/planeshift/code/9959 Author: ravna-ps Date: 2016-08-07 20:38:08 +0000 (Sun, 07 Aug 2016) Log Message: ----------- Fixed: if a "stack size exceeded" message is triggered in transforms, it no longer triggers a garbage process instead. Modified Paths: -------------- trunk/src/server/workmanager.cpp Modified: trunk/src/server/workmanager.cpp =================================================================== --- trunk/src/server/workmanager.cpp 2016-08-06 16:33:14 UTC (rev 9958) +++ trunk/src/server/workmanager.cpp 2016-08-07 20:38:08 UTC (rev 9959) @@ -1580,6 +1580,10 @@ { case TRANSFORM_MATCH: { + if (!trans) // means we got an "exceeded stack size error" + { + return; + } // Set up event for auto transformation StartTransformationEvent( TRANSFORMTYPE_AUTO_CONTAINER, PSCHARACTER_SLOT_NONE, count, autoItem->GetItemQuality(), autoItem); @@ -2267,7 +2271,7 @@ if (transCandidateMultiple->GetResultQty() * targetQty > MAX_STACK_COUNT) { psserver->SendSystemOK(clientNum, "This transformation would create more than %d items, this is not allowed.", MAX_STACK_COUNT); - return match; + return TRANSFORM_MATCH; } if (secure) psserver->SendSystemInfo(clientNum, "Good match for transformation id=%u.\n", transCandidateMultiple->GetId()); trans = transCandidateMultiple; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-08-06 16:33:15
|
Revision: 9958 http://sourceforge.net/p/planeshift/code/9958 Author: ravna-ps Date: 2016-08-06 16:33:14 +0000 (Sat, 06 Aug 2016) Log Message: ----------- Fixed: transformations and combinations now respect maximum stack size, also for bulk crafting. Modified Paths: -------------- trunk/src/server/workmanager.cpp Modified: trunk/src/server/workmanager.cpp =================================================================== --- trunk/src/server/workmanager.cpp 2016-08-04 14:40:25 UTC (rev 9957) +++ trunk/src/server/workmanager.cpp 2016-08-06 16:33:14 UTC (rev 9958) @@ -1369,6 +1369,11 @@ int resultQuality = 0; if(IsContainerCombinable(combinationId, combinationQty)) { + if (combinationQty > MAX_STACK_COUNT) + { + psserver->SendSystemOK(clientNum, "This combination would create more than %d items, this is not allowed.", MAX_STACK_COUNT); + return false; + } //now we know the result quality as this function is going to destroy it we take a copy //TODO: loadlocalvariables is a big nuinseance which should it does unexpected effect to the environment. resultQuality = currentQuality; @@ -1386,7 +1391,7 @@ unsigned int transMatch = AnyTransform(patterns, patternKFactor, combinationId, combinationQty); if ((transMatch == TRANSFORM_MATCH) || (transMatch == TRANSFORM_GARBAGE)) { - // Set up event for transformation + // Set up event for transformation if (workItem->GetCanTransform()) { StartTransformationEvent( @@ -1485,6 +1490,11 @@ int combinationQty = 0; if(IsContainerCombinable(combinationId, combinationQty)) { + if (combinationQty > MAX_STACK_COUNT) + { + psserver->SendSystemOK(clientNum, "This combination would create more than %d items, this is not allowed.", MAX_STACK_COUNT); + return; + } // Check to see if item can be transformed uint32 itemID = workItem->GetBaseStats()->GetUID(); unsigned int transMatch = AnyTransform(patterns, patternKFactor, itemID, 1); @@ -2254,6 +2264,11 @@ // check if we found a match using 0 source or result items, if we do, return that now as a match. if (transCandidateMultiple) { + if (transCandidateMultiple->GetResultQty() * targetQty > MAX_STACK_COUNT) + { + psserver->SendSystemOK(clientNum, "This transformation would create more than %d items, this is not allowed.", MAX_STACK_COUNT); + return match; + } if (secure) psserver->SendSystemInfo(clientNum, "Good match for transformation id=%u.\n", transCandidateMultiple->GetId()); trans = transCandidateMultiple; process = procCandidateMultiple; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-08-04 14:40:27
|
Revision: 9957 http://sourceforge.net/p/planeshift/code/9957 Author: ravna-ps Date: 2016-08-04 14:40:25 +0000 (Thu, 04 Aug 2016) Log Message: ----------- Fixed: work events no longer give a "you moved away" error if the work container is in a different instance. (For example if it's called through an Action Location.) Modified Paths: -------------- trunk/src/server/workmanager.cpp Modified: trunk/src/server/workmanager.cpp =================================================================== --- trunk/src/server/workmanager.cpp 2016-07-31 22:15:58 UTC (rev 9956) +++ trunk/src/server/workmanager.cpp 2016-08-04 14:40:25 UTC (rev 9957) @@ -3592,7 +3592,7 @@ // Check to see if player walked away from non-auto container gemObject* target = workItem->GetGemObject(); - if(worker->RangeTo(target, true) > RANGE_TO_USE) + if(worker->RangeTo(target, true, true) > RANGE_TO_USE) { psserver->SendSystemOK(clientNum,"You interrupted your work when you moved away."); owner->SetTradeWork(NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-07-31 22:16:00
|
Revision: 9956 http://sourceforge.net/p/planeshift/code/9956 Author: ravna-ps Date: 2016-07-31 22:15:58 +0000 (Sun, 31 Jul 2016) Log Message: ----------- Fixed: auto-containers can now again automatically start transformations after a combination was made. Modified Paths: -------------- trunk/src/server/workmanager.cpp Modified: trunk/src/server/workmanager.cpp =================================================================== --- trunk/src/server/workmanager.cpp 2016-07-31 20:56:20 UTC (rev 9955) +++ trunk/src/server/workmanager.cpp 2016-07-31 22:15:58 UTC (rev 9956) @@ -1366,12 +1366,42 @@ // Find out if anything can be combined in container uint32 combinationId = 0; int combinationQty = 0; + int resultQuality = 0; if(IsContainerCombinable(combinationId, combinationQty)) { + //now we know the result quality as this function is going to destroy it we take a copy + //TODO: loadlocalvariables is a big nuinseance which should it does unexpected effect to the environment. + resultQuality = currentQuality; // Transform all items in container into the combination item psItem* newItem = CombineContainedItem(combinationId, combinationQty, currentQuality, workItem); if(newItem) { + //restore the valid current quality + currentQuality = resultQuality; + if (!ValidateMind()) //unfortunately the bad loadlocalvariables is damaging this data so we restore it + { + return false; + } + // Find out if we can do a combination transformation + unsigned int transMatch = AnyTransform(patterns, patternKFactor, combinationId, combinationQty); + if ((transMatch == TRANSFORM_MATCH) || (transMatch == TRANSFORM_GARBAGE)) + { + // Set up event for transformation + if (workItem->GetCanTransform()) + { + StartTransformationEvent( + TRANSFORMTYPE_AUTO_CONTAINER, PSCHARACTER_SLOT_NONE, + combinationQty, currentQuality, newItem); + } + else + { + StartTransformationEvent( + TRANSFORMTYPE_CONTAINER, PSCHARACTER_SLOT_NONE, + combinationQty, currentQuality, newItem); + } + psserver->SendSystemOK(clientNum, "You start to work on combining items."); + return true; + } psserver->SendSystemOK(clientNum,"You start to work on combining items and make %i %s of quality %.0f.", combinationQty, newItem->GetName(), newItem->GetItemQuality()); return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-07-31 20:56:22
|
Revision: 9955 http://sourceforge.net/p/planeshift/code/9955 Author: ravna-ps Date: 2016-07-31 20:56:20 +0000 (Sun, 31 Jul 2016) Log Message: ----------- Fixed a missing argument in npc details -> items Modified Paths: -------------- www/webconsole-new/npcs/npc_details.php Modified: www/webconsole-new/npcs/npc_details.php =================================================================== --- www/webconsole-new/npcs/npc_details.php 2016-07-31 20:50:44 UTC (rev 9954) +++ www/webconsole-new/npcs/npc_details.php 2016-07-31 20:56:20 UTC (rev 9955) @@ -689,7 +689,7 @@ unset($_POST); $result = mysql_query2($query); echo '<p class="error">Update Successful</p>'; - npc_items(); + npc_items($masterId); }else{ if ($masterId > 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-07-31 20:50:46
|
Revision: 9954 http://sourceforge.net/p/planeshift/code/9954 Author: ravna-ps Date: 2016-07-31 20:50:44 +0000 (Sun, 31 Jul 2016) Log Message: ----------- fixed a bug where combinations using wildcards (0 results for as many combines as possible) would only work if the first item in the combination container was also the first used in the combine. Now works in any order (as intended). Modified Paths: -------------- trunk/src/server/workmanager.cpp Modified: trunk/src/server/workmanager.cpp =================================================================== --- trunk/src/server/workmanager.cpp 2016-07-31 10:31:56 UTC (rev 9953) +++ trunk/src/server/workmanager.cpp 2016-07-31 20:50:44 UTC (rev 9954) @@ -1895,18 +1895,34 @@ // Setup two arrays for comparison csArray<psItem*> itemsMatched; csArray<psItem*> itemsLeft = itemArray; + int numberInArray = -1; + // find where in the input we can find the item to match combination item 0. We need this for the next check. + for (size_t i = 0; i < itemArray.GetSize(); i++) + { + if (itemArray[i]->GetCurrentStats()->GetUID() == current->combinations[0]->GetItemId()) + { + numberInArray = i; + break; + } + } + // if not found, we have no match anyway. + if (numberInArray == -1) + { + return false; + } // should be unable to get empty combinations, and this function should not be called without any items being present either, so using [0] "should" be safe. // set up the multiplier if minqty=maxqty=0. if (current->combinations[0]->GetMinQty() == 0 && current->combinations[0]->GetMinQty() == current->combinations[0]->GetMaxQty()) { - multiplier = itemArray[0]->GetStackCount(); + multiplier = itemArray[numberInArray]->GetStackCount(); } // set up the multiplier if result = 0 and min/max qty are identical and stack count is an exact multiple of min qty (all input stacks need to be in the same multiple, but we'll check that later. + // input order may vary, we cannot be sure combinations[0] equals itemArray[0]. else if (current->combinations[0]->GetResultQty() == 0 && current->combinations[0]->GetMinQty() == current->combinations[0]->GetMaxQty() && - itemArray[0]->GetStackCount() % current->combinations[0]->GetMinQty() == 0) + itemArray[numberInArray]->GetStackCount() % current->combinations[0]->GetMinQty() == 0) { - multiplier = itemArray[0]->GetStackCount() / current->combinations[0]->GetMinQty(); + multiplier = itemArray[numberInArray]->GetStackCount() / current->combinations[0]->GetMinQty(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lpa...@us...> - 2016-07-31 10:31:57
|
Revision: 9953 http://sourceforge.net/p/planeshift/code/9953 Author: lpancallo Date: 2016-07-31 10:31:56 +0000 (Sun, 31 Jul 2016) Log Message: ----------- workaround to avoid crash on div by 0. Modified Paths: -------------- trunk/src/server/bulkobjects/psitem.cpp Modified: trunk/src/server/bulkobjects/psitem.cpp =================================================================== --- trunk/src/server/bulkobjects/psitem.cpp 2016-06-15 22:26:29 UTC (rev 9952) +++ trunk/src/server/bulkobjects/psitem.cpp 2016-07-31 10:31:56 UTC (rev 9953) @@ -1691,8 +1691,11 @@ SetGuardingCharacterID(stackme->GetGuardingCharacterID()); // Average charges - int newCharges = (GetCharges()*GetStackCount() + stackme->GetCharges()*stackme->GetStackCount())/newStackCount; - SetCharges(newCharges); + int newCharges = 0; + if (newStackCount>0) { + newCharges = (GetCharges()*GetStackCount() + stackme->GetCharges()*stackme->GetStackCount())/newStackCount; + SetCharges(newCharges); + } psserver->GetCacheManager()->RemoveInstance(stackme); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-06-15 22:26:31
|
Revision: 9952 http://sourceforge.net/p/planeshift/code/9952 Author: ravna-ps Date: 2016-06-15 22:26:29 +0000 (Wed, 15 Jun 2016) Log Message: ----------- Validator now gives an error if you try to run any command other than "require" or "norepeat" before an NPC: tag is given in any step. (All other commands affect the response, and cannot be used without one.) Modified Paths: -------------- www/webconsole-new/quests/validatequest.php Modified: www/webconsole-new/quests/validatequest.php =================================================================== --- www/webconsole-new/quests/validatequest.php 2016-06-15 20:34:37 UTC (rev 9951) +++ www/webconsole-new/quests/validatequest.php 2016-06-15 22:26:29 UTC (rev 9952) @@ -378,6 +378,11 @@ } if(trim($commands[$i]) != '') { + if(strncasecmp(trim($commands[$i]), 'require', 7) !== 0 && !$seen_npc_triggers) + { + append_log("Parse Error: found command '{$commands[$i]}' before any NPC: triggers in current step on line $line_number"); + continue; + } parse_command(trim($commands[$i]), $assigned, $quest_id, $total_steps, $quest_name, $variablesTracker); // using totalsteps now, since we can both require and close future steps now. } else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-06-15 20:34:38
|
Revision: 9951 http://sourceforge.net/p/planeshift/code/9951 Author: ravna-ps Date: 2016-06-15 20:34:37 +0000 (Wed, 15 Jun 2016) Log Message: ----------- Changed various quest commands to not rely on undefined c++ compiler behavior. Added an error message for certain quest commands if they are executed before any NPC: tag is defined in the current step. (This caused a crash.) Modified Paths: -------------- trunk/src/server/questmanager.cpp Modified: trunk/src/server/questmanager.cpp =================================================================== --- trunk/src/server/questmanager.cpp 2016-06-04 22:07:22 UTC (rev 9950) +++ trunk/src/server/questmanager.cpp 2016-06-15 20:34:37 UTC (rev 9951) @@ -580,6 +580,17 @@ op.Append(previous); op.Append("</response>"); + // if no op is defined by this (these) command(s), we return, since some of them (like require) can be defined before any "last response" is set. + if (previous.IsEmpty()) + { + return true; + } + // we have an op *and* we don't have a last response, complain and bail out (to continue into the next if causes memory violations. + if (!last_response) + { + Error2("Can not use '%s' before any NPC: tag in this quest step.", block.GetData()); + return false; + } // add script to last response if(!last_response->ParseResponseScript(op)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ve...@us...> - 2016-06-04 22:07:25
|
Revision: 9950 http://sourceforge.net/p/planeshift/code/9950 Author: venalan Date: 2016-06-04 22:07:22 +0000 (Sat, 04 Jun 2016) Log Message: ----------- Added missing /key command options Modified Paths: -------------- trunk/data/help.xml Modified: trunk/data/help.xml =================================================================== --- trunk/data/help.xml 2016-06-04 21:58:19 UTC (rev 9949) +++ trunk/data/help.xml 2016-06-04 22:07:22 UTC (rev 9950) @@ -1776,7 +1776,15 @@ /key removelock Take the key in hand and make or unmake it into a skeleton key that will open any lock, if you have a security level greater than 'player': -/key skel</content></Contents></topic> +/key skel + +This make a lock either unlockable, or non-unlockable +/key makeunlockable + +This is unused currently. +/key securitylockable + +</content></Contents></topic> <topic name="/kick"><Contents><content type="text">/kick name reason Kicks the named player off of the server.</content></Contents></topic> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ve...@us...> - 2016-06-04 21:58:22
|
Revision: 9949 http://sourceforge.net/p/planeshift/code/9949 Author: venalan Date: 2016-06-04 21:58:19 +0000 (Sat, 04 Jun 2016) Log Message: ----------- corrected description for PSITEM_FLAG_SECURITYLOCK so it shows correctly when using /info Modified Paths: -------------- trunk/src/server/adminmanager.cpp Modified: trunk/src/server/adminmanager.cpp =================================================================== --- trunk/src/server/adminmanager.cpp 2016-06-03 22:13:24 UTC (rev 9948) +++ trunk/src/server/adminmanager.cpp 2016-06-04 21:58:19 UTC (rev 9949) @@ -5262,7 +5262,7 @@ if(flags & PSITEM_FLAG_LOCKABLE) info += " 'lockable'"; if(flags & PSITEM_FLAG_SECURITYLOCK) - info += " 'lockable'"; + info += " 'securitylockable'"; if(flags & PSITEM_FLAG_UNPICKABLE) info += " 'unpickable'"; if(flags & PSITEM_FLAG_NOPICKUP) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rav...@us...> - 2016-06-03 22:13:27
|
Revision: 9948 http://sourceforge.net/p/planeshift/code/9948 Author: ravna-ps Date: 2016-06-03 22:13:24 +0000 (Fri, 03 Jun 2016) Log Message: ----------- Changed launcher to cancel any updates when "play" is pressed. (PS#6484 - Launcher permits attempt to launch game before initialization, crashes) Modified Paths: -------------- trunk/src/pslaunch/pawslauncherwindow.cpp Modified: trunk/src/pslaunch/pawslauncherwindow.cpp =================================================================== --- trunk/src/pslaunch/pawslauncherwindow.cpp 2016-06-03 20:57:33 UTC (rev 9947) +++ trunk/src/pslaunch/pawslauncherwindow.cpp 2016-06-03 22:13:24 UTC (rev 9948) @@ -143,6 +143,11 @@ } else if(ID == PLAY_BUTTON) { + // cancel any pending updates, this is to prevent the launcher from crashing if play is pressed when the downloader is still running. There has to be a better way to do this, and in fact + // the button should not even show while the downloader is still running, but it does. This cancels and gives the thread a little time to end. + psLaunchGUI->CancelUpdater(); + csSleep(1000); + psLaunchGUI->ExecClient(true); psLaunchGUI->Quit(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |