mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Fix fishing messages so when actual fish are caught, name is in message.
This commit is contained in:
+13
-1
@@ -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()))
|
||||
|
||||
Reference in New Issue
Block a user