Created
December 15, 2016 16:47
-
-
Save entrypointkr/ec9d7dab9ec39e7650cb3a5827cc36e9 to your computer and use it in GitHub Desktop.
CommandHelper subset_of() example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 아이템 배열 비교 */ | |
@parent = array('type': 32, 'meta': array( | |
'lore': array('a', 'b', 'c'), | |
'display': 'Test' | |
)) | |
@item = array('data': 0, 'type': 32, 'qty': 10, 'flags': array(), 'meta': array( | |
'lore': array('a', 'b', 'c'), | |
'display': 'Test' | |
)) | |
if (_subset_of(@parent, @item)) { | |
broadcast(true) | |
} | |
/* 위치 배열 비교 */ | |
@parent = array('x': 1, 'y': 2, 'z': 3, 'world': 'world') | |
@loc = array(0: 1, 1: 1, 2: 2, 3: 'world', 'x': 1, 'y': 2, 'z': 3, 'world': 'world') | |
if (_subset_of(@parent, @loc)) { | |
broadcast(true) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment