3541 {
3542 int num = 8000;
3544 for (
int i = 0;
i < 255;
i++)
3545 {
3546 if (Main.player[i].active && Main.player[i].chest >= 0 && Main.player[i].chest < num)
3547 {
3549 }
3550 }
3552 for (
int j = 0;
j < num;
j++)
3553 {
3554 chest = Main.chest[
j];
3555 if (chest != null)
3556 {
3558 {
3559 chest.frameCounter++;
3560 }
3561 else
3562 {
3563 chest.frameCounter--;
3564 }
3565 if (chest.eatingAnimationTime == 9 && chest.frame == 1)
3566 {
3568 }
3569 if (chest.eatingAnimationTime > 0)
3570 {
3571 chest.eatingAnimationTime--;
3572 }
3573 if (chest.frameCounter < chest.eatingAnimationTime)
3574 {
3575 chest.frameCounter = chest.eatingAnimationTime;
3576 }
3577 if (chest.frameCounter < 0)
3578 {
3579 chest.frameCounter = 0;
3580 }
3581 if (chest.frameCounter > 10)
3582 {
3583 chest.frameCounter = 10;
3584 }
3585 if (chest.frameCounter == 0)
3586 {
3587 chest.frame = 0;
3588 }
3589 else if (chest.frameCounter == 10)
3590 {
3591 chest.frame = 2;
3592 }
3593 else
3594 {
3595 chest.frame = 1;
3596 }
3597 }
3598 }
3599 }
static void PlaySound(int type, Vector2 position, int style=1)
static HashSet< int > _chestInUse