private void onSpriteLeaveZone(GameEvent e) { Variant data = e.data; foreach (uint iid in data["iidary"]._arr) { if (!_monInfos.ContainsKey(iid)) { continue; } _monInfos.Remove(iid); if (_monWaitCreateInfos.ContainsKey(iid)) { _monWaitCreateInfos.Remove(iid); } if (!_mons.ContainsKey(iid)) { continue; } LGAvatarMonster ct = _mons[iid]; _mons.Remove(iid); ct.dispose(); } }
private void onSpriteLeaveZone(GameEvent e) { Variant data = e.data; using (List <Variant> .Enumerator enumerator = data["iidary"]._arr.GetEnumerator()) { while (enumerator.MoveNext()) { uint key = enumerator.Current; bool flag = !this._monInfos.ContainsKey(key); if (!flag) { this._monInfos.Remove(key); bool flag2 = this._monWaitCreateInfos.ContainsKey(key); if (flag2) { this._monWaitCreateInfos.Remove(key); } bool flag3 = !this._mons.ContainsKey(key); if (!flag3) { LGAvatarMonster lGAvatarMonster = this._mons[key]; this._mons.Remove(key); lGAvatarMonster.dispose(); } } } } }