mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
fix(Code/Fishing): improve timing of fishing (#4733)
This commit is contained in:
@@ -5497,7 +5497,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
// end time of range when possible catch fish (FISHING_BOBBER_READY_TIME..GetDuration(m_spellInfo))
|
||||
// start time == fish-FISHING_BOBBER_READY_TIME (0..GetDuration(m_spellInfo)-FISHING_BOBBER_READY_TIME)
|
||||
int32 lastSec = 0;
|
||||
switch (urand(0, 3))
|
||||
switch (urand(0, 2))
|
||||
{
|
||||
case 0:
|
||||
lastSec = 3;
|
||||
@@ -5508,12 +5508,11 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
case 2:
|
||||
lastSec = 13;
|
||||
break;
|
||||
case 3:
|
||||
lastSec = 17;
|
||||
break;
|
||||
}
|
||||
|
||||
duration = duration - lastSec * IN_MILLISECONDS + FISHING_BOBBER_READY_TIME * IN_MILLISECONDS;
|
||||
// Duration of the fishing bobber can't be higher than the Fishing channeling duration
|
||||
duration = std::min(duration, duration - lastSec*IN_MILLISECONDS + FISHING_BOBBER_READY_TIME*IN_MILLISECONDS);
|
||||
|
||||
break;
|
||||
}
|
||||
case GAMEOBJECT_TYPE_SUMMONING_RITUAL:
|
||||
|
||||
Reference in New Issue
Block a user