Low priority fix. When returning 0 cash, quest manager still creates a temp string which outputs " pieces." to the client. Then, changed "plat" to "platinum". Also, just a little spacing cleanup. Had an idea to space the cash out (example:
http://everquest.allakhazam.com/db/q...tml?quest=1243), but felt we could leave well enough alone.
Code:
Index: questmgr.cpp
===================================================================
--- questmgr.cpp (revision 1386)
+++ questmgr.cpp (working copy)
@@ -788,41 +788,41 @@
}
void QuestManager::givecash(int copper, int silver, int gold, int platinum) {
- if (initiator && initiator->IsClient())
+ if (initiator && initiator->IsClient() && ((copper + silver + gold + platinum) > 0))
{
- initiator->AddMoneyToPP(copper, silver, gold, platinum,true);
+ initiator->AddMoneyToPP(copper, silver, gold, platinum, true);
string tmp;
- if (platinum>0){
+ if (platinum > 0) {
tmp = "You receive ";
tmp += itoa(platinum);
- tmp += " plat";
+ tmp += " platinum";
}
- if (gold>0){
- if (tmp.length()==0){
+ if (gold > 0) {
+ if (tmp.length() == 0) {
tmp = "You receive ";
}
- else{
+ else {
tmp += ",";
}
tmp += itoa(gold);
tmp += " gold";
}
- if(silver>0){
- if (tmp.length()==0){
+ if(silver > 0) {
+ if (tmp.length() == 0) {
tmp = "You receive ";
}
- else{
+ else {
tmp += ",";
}
tmp += itoa(silver);
tmp += " silver";
}
- if(copper>0){
- if (tmp.length()==0){
+ if(copper > 0) {
+ if (tmp.length() == 0) {
tmp = "You receive ";
}
- else{
+ else {
tmp += ",";
}
tmp += itoa(copper);