Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bug Reports

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

Reply
 
Thread Tools Display Modes
  #1  
Old 03-23-2006, 02:24 PM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default Cash awards from quests

I am running EQEmu 0.6.6-732 with PEQ Luclin Beta 1 DB

When completing a quest that gives a cash reward, the player does recieve the reward, but the string message telling the player reads:

"You recieve # gold, # silver, # copper pieces."

instead of :

"You recieve 1 gold, 2 silver, 3 copper pieces."

And where the # sign is in the first string, you can replace that with a square symbol that I think might be the result of a null value being translated into a string?? Just my theory...

Also, after any quest awards there is no trumpet sound like I remember from live eq. Oddly, I miss that sound.. It made me smile
Reply With Quote
  #2  
Old 03-23-2006, 04:12 PM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Quote:
Also, after any quest awards there is no trumpet sound like I remember from live eq. Oddly, I miss that sound.. It made me smile
quest::ding().
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #3  
Old 06-04-2006, 12:37 PM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

I have corrected this bug. The bug was when a quest gives a player a cash reward, the player doesn't see something like "1 gold, 2 silver, 3 copper". Instead the output they recieve is something like "<null char> gold, <null char> silver, <null char> copper".

Please change the following method:

void QuestManager::givecash(int copper, int silver, int gold, int platinum) {
EQApplicationPacket* outapp = new EQApplicationPacket(OP_MoneyOnCorpse, sizeof(moneyOnCorpseStruct));
moneyOnCorpseStruct* d = (moneyOnCorpseStruct*) outapp->pBuffer;
d->response = 1;
d->unknown1 = 0x5a;
d->unknown2 = 0x40;
d->unknown3 = 0;
if (initiator && initiator->IsClient())
{
d->copper = copper;
d->silver = silver;
d->gold = gold;
d->platinum = platinum;
initiator->AddMoneyToPP(d->copper, d->silver, d->gold, d->platinum,true);
initiator->QueuePacket(outapp);
string tmp;
if (d->platinum>0){
tmp = "You receive ";
tmp += d->platinum;
tmp += " plat";
}
if (d->gold>0){
if (tmp.length()==0){
tmp = "You receive ";
tmp += d->gold;
tmp += " gold";
}
else{
tmp += ",";
tmp += d->gold;
tmp += " gold";
}
}
if(d->silver>0){
if (tmp.length()==0){
tmp = "You receive ";
tmp += d->silver;
tmp += " silver";
}
else{
tmp += ",";
tmp += d->silver;
tmp += " silver";
}
}
if(d->copper>0){
if (tmp.length()==0){
tmp = "You receive ";
tmp += d->copper;
tmp += " copper";
}
else{
tmp += ",";
tmp += d->copper;
tmp += " copper";
}
}
tmp += " pieces.";
if (initiator)
initiator->Message(MT_OOC,tmp.c_str());
}
safe_delete(outapp);
}

To the following method:

void QuestManager::givecash(int copper, int silver, int gold, int platinum) {
EQApplicationPacket* outapp = new EQApplicationPacket(OP_MoneyOnCorpse, sizeof(moneyOnCorpseStruct));
moneyOnCorpseStruct* d = (moneyOnCorpseStruct*) outapp->pBuffer;
d->response = 1;
d->unknown1 = 0x5a;
d->unknown2 = 0x40;
d->unknown3 = 0;
if (initiator && initiator->IsClient())
{
d->copper = copper;
d->silver = silver;
d->gold = gold;
d->platinum = platinum;
initiator->AddMoneyToPP(d->copper, d->silver, d->gold, d->platinum,true);
initiator->QueuePacket(outapp);
string tmp;
if (d->platinum>0){
tmp = "You receive ";
tmp += itoa(d->platinum);
tmp += " plat";
}
if (d->gold>0){
if (tmp.length()==0){
tmp = "You receive ";
tmp += itoa(d->gold);
tmp += " gold";
}
else{
tmp += ",";
tmp += itoa(d->gold);
tmp += " gold";
}
}
if(d->silver>0){
if (tmp.length()==0){
tmp = "You receive ";
tmp += itoa(d->silver);
tmp += " silver";
}
else{
tmp += ",";
tmp += itoa(d->silver);
tmp += " silver";
}
}
if(d->copper>0){
if (tmp.length()==0){
tmp = "You receive ";
tmp += itoa(d->copper);
tmp += " copper";
}
else{
tmp += ",";
tmp += itoa(d->copper);
tmp += " copper";
}
}
tmp += " pieces.";
if (initiator)
initiator->Message(MT_OOC,tmp.c_str());
}
safe_delete(outapp);
}

This will allow the correct output to be sent to the player. Easy fix and not earth shattering. All I did was convert to uint32 datatype to a char that is then appened to the string object. This method is from the questmgr.cpp file.

Last edited by WildcardX; 06-04-2006 at 08:46 PM..
Reply With Quote
  #4  
Old 06-07-2006, 01:35 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

thanks, fixed.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:45 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3