Core/Spells: Fixed fishing bobbers not being usable

Closes #19773
This commit is contained in:
Shauren
2017-07-04 20:30:16 +02:00
parent b7e20d520f
commit 00862295e3
3 changed files with 16 additions and 5 deletions

View File

@@ -332,7 +332,8 @@ bool GameObject::Create(uint32 name_id, Map* map, uint32 /*phaseMask*/, Position
break;
}
case GAMEOBJECT_TYPE_FISHINGNODE:
SetGoAnimProgress(0);
SetUInt32Value(GAMEOBJECT_LEVEL, 1);
SetGoAnimProgress(255);
break;
case GAMEOBJECT_TYPE_TRAP:
if (GetGOInfo()->trap.stealthed)

View File

@@ -667,11 +667,11 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
}
}
//if (GameObject)
//if (HasGameObject)
//{
// *data << uint32(WorldEffectID);
// data->WriteBit(bit8);
// data->FlushBits();
// if (bit8)
// *data << uint32(Int1);
//}
@@ -679,7 +679,8 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
//if (SmoothPhasing)
//{
// data->WriteBit(ReplaceActive);
// data->WriteBit(HasReplaceObjectt);
// data->WriteBit(HasReplaceObject);
// data->FlushBits();
// if (HasReplaceObject)
// *data << ObjectGuid(ReplaceObject);
//}
@@ -688,10 +689,12 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
//{
// data->WriteBit(HasLocalScriptData);
// data->WriteBit(HasPetBattleFullUpdate);
// data->FlushBits();
// if (HasLocalScriptData)
// {
// data->WriteBits(Data.length(), 7);
// data->FlushBits();
// data->WriteString(Data);
// }
@@ -707,6 +710,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
// *data << uint8(Players[i].InputFlags);
// data->WriteBits(Players[i].Pets.size(), 2);
// data->FlushBits();
// for (std::size_t j = 0; j < Players[i].Pets.size(); ++j)
// {
// *data << ObjectGuid(Players[i].Pets[j].BattlePetGUID);
@@ -752,6 +756,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
// }
// data->WriteBits(Players[i].Pets[j].CustomName.length(), 7);
// data->FlushBits();
// data->WriteString(Players[i].Pets[j].CustomName);
// }
// }
@@ -786,6 +791,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
// *data << ObjectGuid(InitialWildPetGUID);
// data->WriteBit(IsPVP);
// data->WriteBit(CanAwardXP);
// data->FlushBits();
// }
//}
@@ -793,6 +799,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
//{
// data->WriteBit(HasSceneInstanceIDs);
// data->WriteBit(HasRuneState);
// data->FlushBits();
// if (HasSceneInstanceIDs)
// {
// *data << uint32(SceneInstanceIDs.size());

View File

@@ -4772,7 +4772,10 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
{
case GAMEOBJECT_TYPE_FISHINGNODE:
{
m_caster->AddChannelObject(pGameObj->GetGUID());
pGameObj->SetFaction(m_caster->getFaction());
ObjectGuid bobberGuid = pGameObj->GetGUID();
// client requires fishing bobber guid in channel object slot 0 to be usable
m_caster->SetDynamicStructuredValue(UNIT_DYNAMIC_FIELD_CHANNEL_OBJECTS, 0, &bobberGuid);
m_caster->AddGameObject(pGameObj); // will removed at spell cancel
// end time of range when possible catch fish (FISHING_BOBBER_READY_TIME..GetDuration(m_spellInfo))