-- Mana correction for old items
UPDATE `items` SET mana_left=90 WHERE mana_left <= 0 AND item_id IN (8821,8822,8823,8824,8825,8826,8827,8828,8829,10005,10006,10007);
UPDATE `items` SET mana_left=300 WHERE mana_left <= 0 AND item_id IN (8830,8831,8832,8833,8834,8835,8836,8837,8838,8839,8840,8841,8842,8843,8844,8845,8846,8847,8848,8849,8850,8851,8852,8853,8854,8855,8856,8857,8858,8859,8860,8861,8862,8863,8864,8865,8866,8867,9820,9821,9822,9823,9824,9825,9826,9827,9828,9829,9840,9841,9842,9843,9844,9845,9846,9847,9848,10125,12835,12836,12837);
UPDATE `items` SET mana_left=120 WHERE mana_left <= 0 AND item_id IN (8926,8927,8928,8929,8930,8931,8932,8933,8934,8937,10008,10009,10010,10011);
UPDATE `items` SET mana_left=600 WHERE mana_left <= 0 AND item_id IN (8972,8973,8974,8975,8976,8977,8978,8979,8980,8981,8982,8983,8984,8985,8986,8987,8988,8989,8990,8991,8992,8993,8994,8995,8996,8997,8998,8999,9000,9001,9002,9003,9004,9005,9006,9007,9008,9009,9010,9011,9012,9013,9014,9015,9016,9017,9018,9019,9020,9021,9022,9023,9024,9025,9026,9027,9028,9029,9030,9031,9032,9033,9034,9035,9036,9037,9038,9039,9040,9041,9042,9043,9044,9045,9046,9047,9048,9049,9050,9051,9052,9053,9054,9055,9056,9057,9058,9059,9060,9061,9062,9063,9064,9065,9066,9067,9068,9069,9070,9071,9072,9073,9074,9075,9076,9077,9078,9079,9080,9081,9082,9083,9084,9085,9086,9087,9088,9089,9090,9091,9092,9093,9094,9095,9096,9097,9098,9099,9100,9101,9102,9103,9128,9129,14104,14790,14791);
UPDATE `items` SET mana_left=230 WHERE mana_left <= 0 AND item_id IN (9141);
UPDATE `items` SET mana_left=360 WHERE mana_left <= 0 AND item_id IN (9177,9178,9179,9180,9181,9182,9183,9184,9185,9186,9187,9188,9189,9190,9191,9192,9193,9194,9195,9196,9197,9198,9199,9200,9201,9202,9203,9204,14753,14754,14755,14756,14757,14758,14759,14760,14761,14762,14763,14764);
UPDATE `items` SET mana_left=400 WHERE mana_left <= 0 AND item_id IN (9900);
UPDATE `items` SET mana_left=700 WHERE mana_left <= 0 AND item_id IN (9909,10139);
UPDATE `items` SET mana_left=60 WHERE mana_left <= 0 AND item_id IN (9913,9933,9934,9935,9936,9937,9938,9939,9940,9941,9942,9943,9944,9945,9946,9947,9948,9949,9950,9951,9960,9961,9962,9963,9964,9965,9966,10158,10423,10535,10536,10537,10538,10539,10540,10541,10543,12814,13770,20098);
UPDATE `items` SET mana_left=65 WHERE mana_left <= 0 AND item_id IN (9914,9916,9917,9919,9921,9922,9923,9926,9927,9928,9929,9930,9954,9955,9956,9957,9958,9959,10416,10417,10418,10419,10420,10421,10422,10424,10533,10534,12815,12816,12817,12818,14810,14811,14814);
UPDATE `items` SET mana_left=75 WHERE mana_left <= 0 AND item_id IN (9915);
UPDATE `items` SET mana_left=74 WHERE mana_left <= 0 AND item_id IN (9918,9931,9932,14813);
UPDATE `items` SET mana_left=64 WHERE mana_left <= 0 AND item_id IN (9920,9924,9925,9952,9953,10542);
UPDATE `items` SET mana_left=250 WHERE mana_left <= 0 AND item_id IN (10140);
UPDATE `items` SET mana_left=70 WHERE mana_left <= 0 AND item_id IN (10141,10142,10518);
UPDATE `items` SET mana_left=180 WHERE mana_left <= 0 AND item_id IN (10211,10470,10471,10472,10474,10475,10476,10477,10478,10479,13153,13154,13155,13156,13157,13158,13159,13160,13161,13162,13163,13164,13165,13166,13167,13168,13169,13170,13171,13172,13173,13174,13175,13176,13177,13178,13179,13180,13181,13182,13183,13184,13185,13186,13187,13188,13189,13190,13191,13192,13193,13194,13195,13196,13197,13198,13199,13200,13201,13202,13203,13204,13205,13206,13207,13208,13209,13210,13211,13212,13213,13214,13215,13216,13217,13218,13219,13220,13221,13222,13223,13224,15313,15314,15315,15316,15317,15318,15319,15320,15321,15322,15323,15324,15325,15326,15403);
UPDATE `items` SET mana_left=200 WHERE mana_left <= 0 AND item_id IN (10273);
UPDATE `items` SET mana_left=500 WHERE mana_left <= 0 AND item_id IN (10315,10321);
UPDATE `items` SET mana_left=80 WHERE mana_left <= 0 AND item_id IN (10519);
UPDATE `items` SET mana_left=1440 WHERE mana_left <= 0 AND item_id IN (10620,10621,10622,10623,10624,10625,10626,10627,10628,10629,10630,10631,22154,22155);
UPDATE `items` SET mana_left=10080 WHERE mana_left <= 0 AND item_id IN (13074,13075,13076);
UPDATE `items` SET mana_left=100 WHERE mana_left <= 0 AND item_id IN (13393,13394);
UPDATE `items` SET mana_left=10 WHERE mana_left <= 0 AND item_id IN (13845,13881);
UPDATE `items` SET mana_left=66 WHERE mana_left <= 0 AND item_id IN (14604,14605,14812);

-- Time correction for old items
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(43200*60*1000) WHERE time <= 0 AND item_id IN (12781,12782,12783,12784,12785,12786,12787,12788,12789,12790,12791,12792,12793,12794,12795,12796,12797,12798,12799,12800,12801,12802,12803,12804,12805,12806,12807,12808,12809,12810,13023,13024,13025,13026,13027,13309,13310,13311,13312,13313,13314,13315,13316,13317,13318,13319,13320,13321,13322,13323,13324,13382,13752,13753,13754,14056,14057,14058,14059,14060,14069,14070,14071,14072,14073,14075,14076,14077,14728,14966,14967,14968,14969,14970,14971,14972,14973,14974,14975,14976,14977,14978,14979,14980,14981,14982,14983,14984,14985,14986,14987,14988,14989,14990,14991,14992,14993,14994,14995,14996,14997,14998,14999,15000,15001,15002,15003,15004,15005,15006,15007,15008,15009,15010,15011,15012,15013,15014,15015,15016,15017,15018,15019,15020,15021,15022,15023,15024,15025,15026,15027,15028,15029,15030,15031,15032,15033,15034,15035,15036,15037,15038,15039,15040,15041,15042,15043,15044,15045,15046,15047,15048,15049,15050,15051,15052,15053,15054,15055,15056,15057,15058,15059,15060,15061,15062,15063,15064,15065,15066,15067,15068,15069,15070,15071,15072,15073,15074,15075,15076,15077,15078,15079,15201,15202,15203,15204,15205,15206,15207,15208,15211,15213,15215,15217,15219,15246,15247,15248,15249,15250,15251,15252,15253,15254,15255,15256,15257,15258,15259,15260,15261,15262,15263,15264,15265,15266,15267,15268,15269,15274,15275,15276,15277,15358,15359,15360,15361,15362,15363,15384,15389,15394,15399,15418,15428,17033,20009,20010,20011,20013,20014,20015,20030,20085,20088,20091,20094,20199,20203,20503,20504,20535,20536,20780,20932,20933,20934,20939,20976,22057,22061,22065);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(10080*60*1000) WHERE time <= 0 AND item_id IN (13022,13239,13240,13241,13242,13243,13244,13245,13246,13247,13248,13249,13250,13251,13252,13253,13254,13255,13308,13325,13326,13327,13328,13329,13330,13331,13332,13333,13334,13335,13336,13337,13338,13339,13340,14053,14054,14066,14067,14088,14089,14090,14091,14092,14093,14094,14095,14096,14097,14098,14099,14100,14101,14102,14103,15383,15388,15393,15398,15429,15436,15464,17051,17052,17053,17054,17055,17056,17057,17058,17059,17060,17061,20099,20201,20205,20208,20224,20225,20226,20231,20232,20237,20238,20248,20249,20250,20255,20256,20257,20258,20259,20260,20261,20262,20263,20264,20265,20266,20267,20268,20269,20270,20298,20300,20302,20304,20305,20306,20308,20311,20313,20339,20340,20345,20346,20351,20352,20399,20400,20405,20406,20407,20408,20409,20410,20411,20412,20413,20414,20415,20416,20417,20418,20419,20420,20421,20422,20423,20424,20425,20426,20427,20428,20429,20430,20431,20432,20433,20434,20435,20436,20437,20438,20439,20440,20441,20442,20443,20444,20445,20446,20447,20448,20449,20496,20537,20538,20539,20568,20600,20601,20616,20617,20618,20626,20628,20633,20655,20657,20659,20661,20663,20665,20667,20669,20671,20673,20675,20677,20679,20724,20727,20743,20744,20745,20746,20747,20762,20774,20775,20776,20777,20778,20781,20785,20786,20787,20790,20791,20794,20795,20819,20821,20823,20825,20827,20829,20831,20833,20835,20837,20839,20841,20867,20897,20938,20940,20941,20943,20945,20956,20982,21042,21046,21049,21051,21053,21055,21057,21059,21061,22055,22059,22063);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(21600*60*1000) WHERE time <= 0 AND item_id IN (13153,13154,13155,13156,13157,13158,13159,13160,13161,13162,13163,13164,13165,13166,13167,13168,13169,13170,13171,13172,13173,13174,13175,13176,13177,13178,13179,13180,13181,13182,13183,13184,13185,13186,13187,13188,13189,13190,13191,13192,13193,13194,13195,13196,13197,13198,13199,13200,13201,13202,13203,13204,13205,13206,13207,13208,13209,13210,13211,13212,13213,13214,13215,13216,13217,13218,13219,13220,13221,13222,13223,13224,15313,15314,15315,15316,15317,15318,15319,15320,15321,15322,15323,15324,15325,15326,15403,15421,20066,20067,20068,20190,20202,20206,20209);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(600*60*1000) WHERE time <= 0 AND item_id IN (13260,20337,20338,20343,20344,20349,20350);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(20160*60*1000) WHERE time <= 0 AND item_id IN (14611,14617,14771,14773,14774,14775,14776,20900,22056,22060,22064);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(180*60*1000) WHERE time <= 0 AND item_id IN (14621,14622,14623,14624,14625,14626,14627,14628,14629,14630,14631,14632,14633,14634,14674,20083,20086,20089,20572);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(47520*60*1000) WHERE time <= 0 AND item_id IN (14675);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(1440*60*1000) WHERE time <= 0 AND item_id IN (14765,20100,20320,20497,20592,20594,20621,20755,20756,20757,20759,20763,20921,22054,22058,22062,22066);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(14400*60*1000) WHERE time <= 0 AND item_id IN (15080,15081,15082,15083,15084,15085,15086,15087,15088,15089,15090,15091,15092,15093,15094,15095,15096,15097,15098,15099,15100,15101,15102,15103,15104,15105,15106,15107,15108,15109,15110,15111,15112,15113,15114,15115,15116,15117,15118,15119,15120,15121,15122,15123,15124,15125,15126,15127,15128,15129,15130,15131,15132,15133,15134,15135,15136,15137,15138,15139,15140,15141,15142,15143,15144,15145,15146,15147,15148,15149,15150,15151,15152,15153,15154,15155,15156,15157,15158,15159,15160,15161,15162,15163,15164,15165,15166,15167,15168,15169,15170,15171,15172,15173,15174,15175,15176,15177,15178,15179,15180,15181,15182,15183,15184,15185,15186,15187,15188,15189,15190,15191,15192,15193,15194,15195,15196,15197,15198,15199,15200,15210,15220,15222,15223,15224,15225,15226,15227,15228,15229,15230,15231,15232,15233,15234,15235,15236,15237,15238,15239,15240,15241,15242,15243,15244,15245,15270,15271,15272,15273,15422);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(7200*60*1000) WHERE time <= 0 AND item_id IN (15310,15423);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(86400*60*1000) WHERE time <= 0 AND item_id IN (15342,15344,15385,15390,15395,15400);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(129600*60*1000) WHERE time <= 0 AND item_id IN (15386,15391,15396,15401,16853,16854,16855,16856,16857,16858,16859,16860,16861,16862,16863,16864,16865,16866,16867,16868,16869,16870,16871,16872,16873,16874,16875,16876,16877,16878,16879,16880,16881,16882,16883,16884,16885,16886,16887,16888,16889,16890,16891,16892,16893,16894,16895,16896,16897,16898,16899,16900,16901,16902,16903,16904,16905,16906,16907,16908,16909,16910,16911,16912,16913,16914,16915,16916,16917,16918,16919,16920,16921,16922,16923,16924,16925,16926,16927,16928,16929,16930,16931,16932,16933,16934,16935,16936,16937,16938,16939,16940,16941,16942,16943,16944,16945,16946,16947,16948,16949,16950,16951,16952,16953,16954,16955,16956,16957,16958,16959,16960,16961,16962,16963,16964,16965,16966,16967,16968,16969,16970,16971,16972,16973,16974,16975,16976,16977,16978,16979,16980,16981,16982,16983,16984,16985,16986,16987,16988,16989,16990,16991,16992,16993,16994,16995,16996,16997,16998,16999,17000,17001,17002);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(36000*60*1000) WHERE time <= 0 AND item_id IN (15419);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(28800*60*1000) WHERE time <= 0 AND item_id IN (15420);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(4320*60*1000) WHERE time <= 0 AND item_id IN (15424,20084,20087,20090,20200,20204,20207,20498,20567,20571,20593,20622);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(240*60*1000) WHERE time <= 0 AND item_id IN (15443,15444,15445,15446,15447,15449,15450,15451,15452,15453,20075,20076,20077,20078,20109,20110,20111,20112,20113,20114,20115,20116,20117,20118,20119,20120,20121,20122,20123,20124,20125,20126,20127,20128,20129,20130,20131,20132,20133,20134,20135,20136,20137,20138,20139,20140,20141,20142,20143,20144,20145,20146,20147,20148,20149,20150,20151,20152,20153,20154,20155,20156,20157,20158,20159,20160,20161,20162,20163,20164,20165,20166,20167,20168,20169,20170,20171,20172,20173,20174,20175,20176,20177,20178,20718,20719,20720,20721,20722);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(4*60*1000) WHERE time <= 0 AND item_id IN (15485);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(480*60*1000) WHERE time <= 0 AND item_id IN (20103,20104,20105,20106,20606);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(720*60*1000) WHERE time <= 0 AND item_id IN (20107,20108);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(300*60*1000) WHERE time <= 0 AND item_id IN (20335,20336,20341,20342,20347,20348,20570);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(120*60*1000) WHERE time <= 0 AND item_id IN (20712,20713,20714,20715,20716);
UPDATE `items` SET time=(unix_timestamp(NOW())*1000)+(60*60*1000) WHERE time <= 0 AND item_id IN (20741,20742,21084,21086);
