public override void Pulse() { if(!_initialized || !ExtensiveCheck() || !AreNPCsNear()) { return; } CustomLog.Diagnostic("Step : {0}", _shoppingStep); switch(_shoppingStep) { case 0: GoShopping(); break; case 1: CreateGroceries(); break; case 2: MoveToTurnIn(); break; } }
// =========================================================== // Inner and Anonymous Classes // =========================================================== private static int UpdateShoppingList(int id) { CustomLog.Diagnostic("ItemID : {0} : {1}", id, ItemList.Any(u => u == id) ? Lua.GetReturnVal<int>(string.Format("return GetItemCount({0})", id), 0) : 0); return ItemList.Any(u => u == id) ? Lua.GetReturnVal<int>(string.Format("return GetItemCount({0})", id), 0) : 0; }