mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10989] Implement post-3.1 and later fishing changes.
* Fishing now prowide junk loot at fail skill check. This can be disabled for old way work using SkillFail.Loot.Fishing option. Junk loot expected to be listed in fishing_loot_template entry 0. * Fishing can gain skill grow at skill fail check case. Controlled by SkillFail.Gain.Fishing option. * Fishing from fishing pool gameobject can't be fail. Controlled by SkillFail.Possible.FishingPool
This commit is contained in:
parent
d2b3977fee
commit
39e7b19267
12 changed files with 82 additions and 21 deletions
|
|
@ -7900,7 +7900,7 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
|
|||
|
||||
// not check distance for GO in case owned GO (fishing bobber case, for example)
|
||||
// And permit out of range GO with no owner in case fishing hole
|
||||
if (!go || (loot_type != LOOT_FISHINGHOLE && (loot_type != LOOT_FISHING || go->GetOwnerGuid() != GetObjectGuid()) && !go->IsWithinDistInMap(this,INTERACTION_DISTANCE)))
|
||||
if (!go || (loot_type != LOOT_FISHINGHOLE && (loot_type != LOOT_FISHING && loot_type != LOOT_FISHING_FAIL || go->GetOwnerGuid() != GetObjectGuid()) && !go->IsWithinDistInMap(this,INTERACTION_DISTANCE)))
|
||||
{
|
||||
SendLootRelease(guid);
|
||||
return;
|
||||
|
|
@ -7921,15 +7921,18 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
|
|||
return;
|
||||
}
|
||||
|
||||
if (lootid)
|
||||
// Entry 0 in fishing loot template used for store junk fish loot at fishing fail it junk allowed by config option
|
||||
// this is overwrite fishinghole loot for example
|
||||
if (loot_type == LOOT_FISHING_FAIL)
|
||||
loot->FillLoot(0, LootTemplates_Fishing, this, true);
|
||||
else if (lootid)
|
||||
{
|
||||
DEBUG_LOG(" if(lootid)");
|
||||
loot->clear();
|
||||
loot->FillLoot(lootid, LootTemplates_Gameobject, this, false);
|
||||
loot->generateMoneyLoot(go->GetGOInfo()->MinMoneyLoot, go->GetGOInfo()->MaxMoneyLoot);
|
||||
}
|
||||
|
||||
if (loot_type == LOOT_FISHING)
|
||||
else if (loot_type == LOOT_FISHING)
|
||||
go->getFishLoot(loot,this);
|
||||
|
||||
go->SetLootState(GO_ACTIVATED);
|
||||
|
|
@ -8142,8 +8145,9 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
|
|||
// LOOT_INSIGNIA and LOOT_FISHINGHOLE unsupported by client
|
||||
switch(loot_type)
|
||||
{
|
||||
case LOOT_INSIGNIA: loot_type = LOOT_SKINNING; break;
|
||||
case LOOT_FISHINGHOLE: loot_type = LOOT_FISHING; break;
|
||||
case LOOT_INSIGNIA: loot_type = LOOT_SKINNING; break;
|
||||
case LOOT_FISHING_FAIL: loot_type = LOOT_FISHING; break;
|
||||
case LOOT_FISHINGHOLE: loot_type = LOOT_FISHING; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue