mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
feat(model): ModelSceneActor ApplySpellVisualKit
A ClassicAPI extension with the contract of retail's PlayerModel (CharacterModelBase) method of the same name. The kit is added next to the kits that the actor already shows. The actor's SetSpellVisualKit keeps retail's behaviour: it replaces the actor's one kit. The kit goes through Model::VisualKit::Apply, the same routine PlayerModel:ApplySpellVisualKit uses. This is the char-select ghost's kit step (0x004727F0) for any kit: the effect models hang at their attachments, and the tint and alpha procedures apply. The model owns the effects, so a looping kit stays until the model changes, and a oneShot kit stops when its sequence ends. HasAttachment waits for an unloaded model file, so a call made before the model has loaded is held in Actor::pendingKits and applied with SetSpellVisualKit's kit once the model loads.
This commit is contained in:
+15
@@ -869,6 +869,7 @@ build instructions.
|
||||
- [`actor:SetAnimationBlendOperation(blendOperation)` / `actor:GetAnimationBlendOperation()`](#actorsetanimationblendoperationblendoperation--actorgetanimationblendoperation)
|
||||
- [`actor:SetPaused(paused [, affectsGlobalPause])` / `actor:GetPaused()`](#actorsetpausedpaused--affectsglobalpause--actorgetpaused)
|
||||
- [`actor:SetSpellVisualKit([spellVisualKitID, oneShot])` / `actor:GetSpellVisualKit()`](#actorsetspellvisualkitspellvisualkitid-oneshot--actorgetspellvisualkit)
|
||||
- [`actor:ApplySpellVisualKit(spellVisualKitID [, oneShot])`](#actorapplyspellvisualkitspellvisualkitid--oneshot)
|
||||
- [`actor:PlayAnimationKit(animationKit [, isLooping])` / `actor:StopAnimationKit()`](#actorplayanimationkitanimationkit--islooping--actorstopanimationkit)
|
||||
- [`actor:AttachToMount(rider, animation [, spellKitVisualID])`](#actorattachtomountrider-animation--spellkitvisualid)
|
||||
- [`actor:DetachFromMount(rider)`](#actordetachfrommountrider)
|
||||
@@ -19599,6 +19600,20 @@ caster:SetSpellVisualKit(38, true) -- Fireball cast
|
||||
target:SetSpellVisualKit(286, true) -- Fireball impact
|
||||
```
|
||||
|
||||
### `actor:ApplySpellVisualKit(spellVisualKitID [, oneShot])`
|
||||
|
||||
Adds the effects of a spell visual kit to the model. The kits that the model
|
||||
already shows stay: those of `SetSpellVisualKit`, of `PlaySpellVisual`, and
|
||||
of earlier calls of this method. With `oneShot` set to `true`, each effect
|
||||
plays one time. Without it, the effects stay until the model changes. As
|
||||
with `SetSpellVisualKit`, the kit does not play its animation or its sound.
|
||||
If the model has not loaded, the kit shows when it loads. This is a
|
||||
ClassicAPI extension.
|
||||
|
||||
```lua
|
||||
target:ApplySpellVisualKit(286, true) -- a Fireball impact, the old kit stays
|
||||
```
|
||||
|
||||
### `actor:PlayAnimationKit(animationKit [, isLooping])` / `actor:StopAnimationKit()`
|
||||
|
||||
These have no effect. There are no animation kits in this game.
|
||||
|
||||
Reference in New Issue
Block a user