void AreaTrigger::Update(uint32 diff) { WorldObject::Update(diff); _timeSinceCreated += diff; // "If" order matter here, Circular Movement > Attached > Splines if (HasCircularMovement()) { UpdateCircularMovementPosition(diff); } else if (GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_ATTACHED)) { if (Unit* target = GetTarget()) GetMap()->AreaTriggerRelocation(this, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation()); } else UpdateSplinePosition(diff); if (GetDuration() != -1) { if (GetDuration() > int32(diff)) _UpdateDuration(_duration - diff); else { Remove(); // expired return; } } _ai->OnUpdate(diff); UpdateTargetList(); }
void InfoWin::Update(uint32 which) { if (!fController->Lock()) return; if ((which & INFO_FILE) != 0) _UpdateFile(); // video track format information if ((which & INFO_VIDEO) != 0) _UpdateVideo(); // audio track format information if ((which & INFO_AUDIO) != 0) _UpdateAudio(); // statistics if ((which & INFO_STATS) != 0) { _UpdateDuration(); // TODO: demux/video/audio/... perfs (Kb/info) } if ((which & INFO_TRANSPORT) != 0) { // Transport protocol info (file, http, rtsp, ...) } if ((which & INFO_COPYRIGHT)!=0) _UpdateCopyright(); fController->Unlock(); }