[11543] Fixed change form to same (powershifting)

Inspired by patch provided by darkstalker.

Client expected receive form field change at form switing including case with switch to same form.
In fact problem too good mangos optimization in part avoid send unchanged values in update fields.

* Added function Object::SendForcedObjectUpdate()
* It used in form apply code for make sure received by client non-form applied state in middle form shifting state.
* It also used for fishing code when client also expected received some update fields chnages before
  animation update. New function send update to all all client instead before used code that send it to fishing player
  and resend later one more time to other players and player itself as normal update.
This commit is contained in:
VladimirMangos 2011-05-26 17:09:09 +04:00
parent 81984732a3
commit c5b6cc0b37
5 changed files with 50 additions and 31 deletions

View file

@ -190,11 +190,7 @@ void GameObject::Update(uint32 update_diff, uint32 /*p_time*/)
SetGoState(GO_STATE_ACTIVE);
// SetUInt32Value(GAMEOBJECT_FLAGS, GO_FLAG_NODESPAWN);
UpdateData udata;
WorldPacket packet;
BuildValuesUpdateBlockForPlayer(&udata,((Player*)caster));
udata.BuildPacket(&packet);
((Player*)caster)->GetSession()->SendPacket(&packet);
SendForcedObjectUpdate();
SendGameObjectCustomAnim(GetObjectGuid());
}