From: <rds...@us...> - 2007-12-03 01:24:38
|
Revision: 349 http://planeshift.svn.sourceforge.net/planeshift/?rev=349&view=rev Author: rdschulz Date: 2007-12-02 17:24:43 -0800 (Sun, 02 Dec 2007) Log Message: ----------- *** 2007-12-02 by Roland Schulz - Fix tell window to use last addressed character instead of outputting to main when player forgets the /tell, thanks to Rakhun *bows*. - Add armor making skill as requested by TomT. - Added NO_RANDOM_QUALITY define to workmanager for testing crafting. - Added combine button to paws container window. Modified Paths: -------------- trunk/data/gui/containerdesc.xml trunk/docs/history.txt trunk/src/client/gui/chatwindow.cpp trunk/src/client/gui/pawscontainerdescwindow.cpp trunk/src/server/bulkobjects/psskills.h trunk/src/server/database/mysql/skills.sql trunk/src/server/workmanager.cpp Modified: trunk/data/gui/containerdesc.xml =================================================================== --- trunk/data/gui/containerdesc.xml 2007-12-03 00:43:26 UTC (rev 348) +++ trunk/data/gui/containerdesc.xml 2007-12-03 01:24:43 UTC (rev 349) @@ -16,6 +16,11 @@ <bgimage resource="view" /> </widget> + <widget name="Combine" factory="pawsButton" id="13" tooltip="Combine items in container"> + <frame x="48" y="92" width="32" height="32" /> + <bgimage resource="ButtonCombine" /> + </widget> + <widget name="Inventory" factory="pawsButton" id="12" tooltip="Transfer to inventory"> <frame x="48" y="0" width="32" height="32" /> <bgimage resource="InventoryBulk" /> Modified: trunk/docs/history.txt =================================================================== --- trunk/docs/history.txt 2007-12-03 00:43:26 UTC (rev 348) +++ trunk/docs/history.txt 2007-12-03 01:24:43 UTC (rev 349) @@ -1,3 +1,10 @@ +*** 2007-12-02 by Roland Schulz +- Fix tell window to use last addressed character instead of outputting to + main when player forgets the /tell, thanks to Rakhun *bows*. +- Add armor making skill as requested by TomT. +- Added NO_RANDOM_QUALITY define to workmanager for testing crafting. +- Added combine button to paws container window. + *** 2007-12-02 by Andrew Craig - Some code formatting clean ups and fixed a crash when server exists. Modified: trunk/src/client/gui/chatwindow.cpp =================================================================== --- trunk/src/client/gui/chatwindow.cpp 2007-12-03 00:43:26 UTC (rev 348) +++ trunk/src/client/gui/chatwindow.cpp 2007-12-03 01:24:43 UTC (rev 349) @@ -671,13 +671,46 @@ } else if (words[0] == "/me" || words[0] == "/my") { + pPerson = ""; csString chatType = tabs->GetActiveTab()->GetName(); csArray<csString> allowedTabs; csString defaultButton("Main Button"); - if (chatType == "GuildText") + if (chatType == "TellText") { + int i = 0; + while (!replyList[i].IsEmpty() && i <= 4) + i++; + if (i) + { + if (replyCount >= i) + replyCount = 0; + pPerson=replyList[replyCount].GetData(); + replyCount++; + } + words.GetTail(0,text); + chattype = CHAT_TELL; + csArray<csString> allowedTabs; + allowedTabs.Push("TellText"); + defaultButton = "Tell Button"; + if (settings.tellIncluded) + allowedTabs.Push("MainText"); + switch (settings.selectTabStyle) + { + case 1: + AutoselectChatTabIfNeeded(allowedTabs, "Tell Button"); + break; + case 2: + AutoselectChatTabIfNeeded(allowedTabs, settings.tellIncluded ? + "Main Button" : "Tell Button"); + break; + default: + break; + } + } + else if (chatType == "GuildText") + { chattype = CHAT_GUILD; words.GetTail(0,text); allowedTabs.Push("GuildText"); @@ -714,7 +747,7 @@ words.GetTail(1,text); allowedTabs.Push("MainText"); } - pPerson = ""; + //pPerson = ""; switch (settings.selectTabStyle) { case 1: @@ -1619,7 +1652,24 @@ { csString chatType = tabs->GetActiveTab()->GetName(); - if (chatType == "GuildText") + if (chatType == "TellText") + { + int i = 0; + csString buf; + while (!replyList[i].IsEmpty() && i <= 4) + i++; + if (!i) + { + textToSend.Insert(0, "/tell "); + }else{ + if (replyCount >= i) + replyCount = 0; + buf.Format("/tell %s ", replyList[replyCount].GetData()); + textToSend.Insert(0, buf.GetData()); + replyCount++; + } + } + else if (chatType == "GuildText") textToSend.Insert(0, "/guild "); else if (chatType == "GroupText") textToSend.Insert(0, "/group "); @@ -1864,7 +1914,7 @@ void pawsChatWindow::AutoReply(void) { int i = 0; - char buf[100]; + csString buf; while (!replyList[i].IsEmpty() && i <= 4) i++; @@ -1878,8 +1928,8 @@ if (replyCount >= i) replyCount = 0; - sprintf(buf, "/tell %s ", replyList[replyCount].GetData()); - inputText->SetText(buf); + buf.Format("/tell %s ", replyList[replyCount].GetData()); + inputText->SetText(buf.GetData()); replyCount++; } Modified: trunk/src/client/gui/pawscontainerdescwindow.cpp =================================================================== --- trunk/src/client/gui/pawscontainerdescwindow.cpp 2007-12-03 00:43:26 UTC (rev 348) +++ trunk/src/client/gui/pawscontainerdescwindow.cpp 2007-12-03 01:24:43 UTC (rev 349) @@ -37,6 +37,7 @@ #include "paws/pawsmanager.h" #include "net/messages.h" #include "net/msghandler.h" +#include "net/cmdhandler.h" #include "util/log.h" #include "gui/pawsslot.h" @@ -47,6 +48,7 @@ // BUTTONS AND SLOTS #define VIEW_BUTTON 11 #define INVENTORY_BUTTON 12 +#define COMBINE_BUTTON 13 ////////////////////////////////////////////////////////////////////// // Construction/Destruction @@ -262,7 +264,23 @@ return true; } - + else if ( widget->GetID() == COMBINE_BUTTON ) + { + GEMClientObject* oldtarget = psengine->GetCharManager()->GetTarget(); + int oldID = 0; + if(oldtarget) + { + oldID = oldtarget->GetEntity()->GetID(); + } + //printf("selecting containerID %d, oldID %d\n", containerID, oldID); + psUserActionMessage setnewtarget(0, containerID, "select"); + setnewtarget.SendMessage(); + //printf("combining\n"); + psengine->GetCmdHandler()->Execute("/combine"); + //printf("selecting oldID %d\n", oldID); + psUserActionMessage setoldtarget(0, oldID, "select"); + setoldtarget.SendMessage(); + } return true; } Modified: trunk/src/server/bulkobjects/psskills.h =================================================================== --- trunk/src/server/bulkobjects/psskills.h 2007-12-03 00:43:26 UTC (rev 348) +++ trunk/src/server/bulkobjects/psskills.h 2007-12-03 01:24:43 UTC (rev 349) @@ -94,7 +94,9 @@ PSSKILL_GEMCUTTING = 61, PSSKILL_POTTERY = 62, PSSKILL_METALLURGY = 63, - PSSKILL_COUNT = 64 + PSSKILL_ARMORMAKING = 64, + PSSKILL_ILLUSTRATION = 65, + PSSKILL_COUNT = 66 }; //These flags define the possible skills categories enum PSSKILLS_CATEGORY Modified: trunk/src/server/database/mysql/skills.sql =================================================================== --- trunk/src/server/database/mysql/skills.sql 2007-12-03 00:43:26 UTC (rev 348) +++ trunk/src/server/database/mysql/skills.sql 2007-12-03 01:24:43 UTC (rev 349) @@ -98,7 +98,8 @@ INSERT INTO `skills` VALUES (61,'skill61','',0,80,42,20,'VARIOUS'); INSERT INTO `skills` VALUES (62,'skill62','',0,80,42,20,'VARIOUS'); INSERT INTO `skills` VALUES (63,'Metallurgy','',0,80,42,20,'VARIOUS'); -INSERT INTO `skills` VALUES (64,'Illustration','Drawing and editing sketches, scrolls, maps, signs and poems.',0,80,42,20,'VARIOUS'); +INSERT INTO `skills` VALUES (64,'Armor Making','The making of various types of armor.',60,80,42,20,'JOBS'); +INSERT INTO `skills` VALUES (65,'Illustration','Drawing and editing sketches, scrolls, maps, signs and poems.',0,80,42,20,'VARIOUS'); /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; Modified: trunk/src/server/workmanager.cpp =================================================================== --- trunk/src/server/workmanager.cpp 2007-12-03 00:43:26 UTC (rev 348) +++ trunk/src/server/workmanager.cpp 2007-12-03 01:24:43 UTC (rev 349) @@ -48,6 +48,7 @@ #include "util/mathscript.h" //#define DEBUG_WORKMANAGER // debugging only +//#define NO_RANDOM_QUALITY // no not apply randomness to calculations /* * There are four types of work that can be done: @@ -3198,6 +3199,7 @@ } } +#ifndef NO_RANDOM_QUALITY // Randomize the final quality results // We are using a logrithmic calculation so that normally there is little quality change // except at the edges of the random distribution. @@ -3205,6 +3207,7 @@ float roll = psserver->rng->Get(); float expFactor = factor*log((1/roll)-1); currentQuality = currentQuality -((currentQuality*expFactor)/100); +#endif } // Adjust the final quality with the transformation quality factor This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |