Fix fishing messages so when actual fish are caught, name is in message.

This commit is contained in:
Paul Coene 2016-11-27 16:43:43 -05:00
parent 95efc3a66c
commit 246f770e8f
2 changed files with 14 additions and 1 deletions

View File

@ -221,6 +221,8 @@ bool Client::CanFish() {
void Client::GoFish()
{
bool junk=false;
//TODO: generate a message if we're already fishing
/*if (!fishing_timer.Check()) { //this isn't the right check, may need to add something to the Client class like 'bool is_fishing'
Message_StringID(0, ALREADY_FISHING); //You are already fishing!
@ -302,11 +304,21 @@ void Client::GoFish()
if(food_id == 0) {
int index = zone->random.Int(0, MAX_COMMON_FISH_IDS-1);
food_id = common_fish_ids[index];
if (food_id != 13019) {
junk=true; // Alters the message to "caught something..."
}
}
const EQEmu::ItemData* food_item = database.GetItem(food_id);
Message_StringID(MT_Skills, FISHING_SUCCESS);
if (junk == true) {
Message_StringID(MT_Skills, FISHING_SUCCESS);
}
else {
Message_StringID(MT_Skills, FISHING_SUCCESS_FISH_NAME, food_item->Name);
}
EQEmu::ItemInstance* inst = database.CreateItem(food_item, 1);
if(inst != nullptr) {
if(CheckLoreConflict(inst->GetItem()))

View File

@ -46,6 +46,7 @@
#define FISHING_FAILED 168 //You didn't catch anything.
#define FISHING_POLE_BROKE 169 //Your fishing pole broke!
#define FISHING_SUCCESS 170 //You caught, something...
#define FISHING_SUCCESS_FISH_NAME 421 //You caught %1!
#define FISHING_SPILL_BEER 171 //You spill your beer while bringing in your line.
#define FISHING_LOST_BAIT 172 //You lost your bait!
#define SPELL_FIZZLE 173 //Your spell fizzles!