Files

23 lines
710 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Grim.js — sendMorphToViewer() (satır 426)
[← Grim.js](index.md) · [← Master](../../wiki.md)
```javascript
function sendMorphToViewer(viewer, target, morph) {
if (!viewer || !target || !morph) return false;
if (!viewerCanTrack(viewer, target)) return false;
try {
MetamorphDispatcher.sendTo(new PacketMorphPlayer(getEntityId(target), morph), getMcPlayer(viewer));
return true;
} catch (e1) {
try {
var packet = new PacketMorphPlayer(getEntityId(target), morph);
MetamorphDispatcher.DISPATCHER.sendTo(packet, getMcPlayer(viewer));
return true;
} catch (e2) {}
}
return false;
}
```