49221 {
49223 {
49224 float num = (float)Main.rand.Next(90, 111) * 0.01f;
49225 num *= (Main.essScale + 0.5f) / 2f;
49226 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.25f * num, 0.25f * num, 0.25f * num);
49227 }
49228 else if (
type == 3191)
49229 {
49230 float num2 = (float)Main.rand.Next(90, 111) * 0.01f;
49231 num2 *= (Main.essScale + 0.5f) / 2f;
49232 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.3f *
num2, 0.1f *
num2, 0.25f *
num2);
49233 }
49234 else if (
type == 520 ||
type == 3454)
49235 {
49236 float num3 = (float)Main.rand.Next(90, 111) * 0.01f;
49237 num3 *= Main.essScale;
49238 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.5f *
num3, 0.1f *
num3, 0.25f *
num3);
49239 }
49240 else if (
type == 521 ||
type == 3455)
49241 {
49242 float num4 = (float)Main.rand.Next(90, 111) * 0.01f;
49243 num4 *= Main.essScale;
49244 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.25f *
num4, 0.1f *
num4, 0.5f *
num4);
49245 }
49246 else if (
type == 547 ||
type == 3453)
49247 {
49248 float num5 = (float)Main.rand.Next(90, 111) * 0.01f;
49249 num5 *= Main.essScale;
49250 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.5f *
num5, 0.3f *
num5, 0.05f *
num5);
49251 }
49252 else if (
type == 548)
49253 {
49254 float num6 = (float)Main.rand.Next(90, 111) * 0.01f;
49255 num6 *= Main.essScale;
49256 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.1f *
num6, 0.1f *
num6, 0.6f *
num6);
49257 }
49258 else if (
type == 575)
49259 {
49260 float num7 = (float)Main.rand.Next(90, 111) * 0.01f;
49261 num7 *= Main.essScale;
49262 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.1f *
num7, 0.3f *
num7, 0.5f *
num7);
49263 }
49264 else if (
type == 549)
49265 {
49266 float num8 = (float)Main.rand.Next(90, 111) * 0.01f;
49267 num8 *= Main.essScale;
49268 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.1f *
num8, 0.5f *
num8, 0.2f *
num8);
49269 }
49271 {
49272 float num9 = (float)Main.rand.Next(90, 111) * 0.01f;
49273 num9 *= Main.essScale * 0.5f;
49274 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.5f *
num9, 0.1f *
num9, 0.1f *
num9);
49275 }
49277 {
49278 float num10 = (float)Main.rand.Next(90, 111) * 0.01f;
49279 num10 *= Main.essScale * 0.5f;
49281 }
49282 else if (
type == 522)
49283 {
49284 float num11 = (float)Main.rand.Next(90, 111) * 0.01f;
49285 num11 *= Main.essScale * 0.2f;
49287 }
49288 else if (
type == 1332)
49289 {
49290 float num12 = (float)Main.rand.Next(90, 111) * 0.01f;
49291 num12 *= Main.essScale * 0.2f;
49293 }
49294 else if (
type == 3456)
49295 {
49296 Lighting.AddLight(
base.Center,
new Vector3(0.2f, 0.4f, 0.5f) * Main.essScale);
49297 }
49298 else if (
type == 3457)
49299 {
49300 Lighting.AddLight(
base.Center,
new Vector3(0.4f, 0.2f, 0.5f) * Main.essScale);
49301 }
49302 else if (
type == 3458)
49303 {
49304 Lighting.AddLight(
base.Center,
new Vector3(0.5f, 0.4f, 0.2f) * Main.essScale);
49305 }
49306 else if (
type == 3459)
49307 {
49308 Lighting.AddLight(
base.Center,
new Vector3(0.2f, 0.2f, 0.5f) * Main.essScale);
49309 }
49310 else if (
type == 501)
49311 {
49312 if (Main.rand.Next(6) == 0)
49313 {
49315 Main.dust[
num13].velocity *= 0.3f;
49316 Main.dust[
num13].scale *= 0.5f;
49317 }
49318 }
49319 else if (
type == 3822)
49320 {
49321 Lighting.AddLight(
base.Center, 0.1f, 0.3f, 0.1f);
49322 }
49323 else if (
type == 1970)
49324 {
49325 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.75f, 0f, 0.75f);
49326 }
49327 else if (
type == 1972)
49328 {
49329 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0f, 0f, 0.75f);
49330 }
49331 else if (
type == 1971)
49332 {
49333 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.75f, 0.75f, 0f);
49334 }
49335 else if (
type == 1973)
49336 {
49337 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0f, 0.75f, 0f);
49338 }
49339 else if (
type == 1974)
49340 {
49341 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.75f, 0f, 0f);
49342 }
49343 else if (
type == 1975)
49344 {
49345 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.75f, 0.75f, 0.75f);
49346 }
49347 else if (
type == 1976)
49348 {
49349 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.75f, 0.375f, 0f);
49350 }
49351 else if (
type == 2679)
49352 {
49353 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.6f, 0f, 0.6f);
49354 }
49355 else if (
type == 2687)
49356 {
49357 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0f, 0f, 0.6f);
49358 }
49359 else if (
type == 2689)
49360 {
49361 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.6f, 0.6f, 0f);
49362 }
49363 else if (
type == 2683)
49364 {
49365 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0f, 0.6f, 0f);
49366 }
49367 else if (
type == 2685)
49368 {
49369 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.6f, 0f, 0f);
49370 }
49371 else if (
type == 2681)
49372 {
49373 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.6f, 0.6f, 0.6f);
49374 }
49375 else if (
type == 2677)
49376 {
49377 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.6f, 0.375f, 0f);
49378 }
49379 else if (
type == 105)
49380 {
49382 {
49383 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 1f, 0.95f, 0.8f);
49384 }
49385 }
49386 else if (
type == 2701)
49387 {
49388 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.7f, 0.65f, 0.55f);
49389 }
49391 {
49394 {
49396 }
49397 }
49398 else if (
type == 3114)
49399 {
49401 {
49402 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 1f, 0f, 1f);
49403 }
49404 }
49405 else if (
type == 1245)
49406 {
49408 {
49409 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 1f, 0.5f, 0f);
49410 }
49411 }
49412 else if (
type == 433)
49413 {
49415 {
49416 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.5f * Main.demonTorch + 1f * (1f - Main.demonTorch), 0.3f, 1f * Main.demonTorch + 0.5f * (1f - Main.demonTorch));
49417 }
49418 }
49419 else if (
type == 523)
49420 {
49421 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.85f, 1.2f, 0.7f);
49422 }
49423 else if (
type == 974)
49424 {
49426 {
49427 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.75f, 0.85f, 1.4f);
49428 }
49429 }
49430 else if (
type == 1333)
49431 {
49432 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 1.25f, 1.25f, 0.7f);
49433 }
49434 else if (
type == 4383)
49435 {
49437 {
49438 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 1.4f, 0.85f, 0.55f);
49439 }
49440 }
49441 else if (
type == 5293)
49442 {
49444 {
49445 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.25f, 0.65f, 1f);
49446 }
49447 }
49448 else if (
type == 5353)
49449 {
49451 {
49452 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.81f, 0.72f, 1f);
49453 }
49454 }
49455 else if (
type == 4384)
49456 {
49457 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.25f, 1.3f, 0.8f);
49458 }
49459 else if (
type == 3045)
49460 {
49461 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), (
float)Main.DiscoR / 255f, (float)Main.DiscoG / 255f, (
float)Main.DiscoB / 255f);
49462 }
49463 else if (
type == 3004)
49464 {
49465 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.95f, 0.65f, 1.3f);
49466 }
49467 else if (
type == 2274)
49468 {
49470 float g = 1.3499999f;
49473 {
49474 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f),
r, g,
b);
49475 }
49476 }
49477 else if (
type >= 427 &&
type <= 432)
49478 {
49480 {
49486 {
49490 }
49492 {
49496 }
49498 {
49502 }
49504 {
49508 }
49510 {
49514 }
49516 {
49520 }
49521 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f),
r2,
g2,
b2);
49522 }
49523 }
49525 {
49526 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.4f, 0.16f, 0.36f);
49527 }
49529 {
49530 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0f, 0.36f, 0.4f);
49531 }
49533 {
49534 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 0.5f, 0.25f, 0.05f);
49535 }
49537 {
49538 Lighting.AddLight(
base.Center, 0.3f, 0.3f, 0.2f);
49539 }
49540 else if (
type == 41)
49541 {
49543 {
49544 Lighting.AddLight((
int)((position.X + (float)
width) / 16f), (
int)((position.Y + (float)(
height / 2)) / 16f), 1f, 0.75f, 0.55f);
49545 }
49546 }
49547 else if (
type == 988)
49548 {
49550 {
49551 Lighting.AddLight((
int)((position.X + (float)
width) / 16f), (
int)((position.Y + (float)(
height / 2)) / 16f), 0.35f, 0.65f, 1f);
49552 }
49553 }
49554 else if (
type == 1326)
49555 {
49556 Lighting.AddLight((
int)base.Center.X / 16, (int)
base.Center.Y / 16, 1f, 0.1f, 0.8f);
49557 }
49558 else if (
type == 5335)
49559 {
49560 Lighting.AddLight((
int)base.Center.X / 16, (int)
base.Center.Y / 16, 0.85f, 0.1f, 0.8f);
49561 }
49562 else if (
type >= 5140 &&
type <= 5146)
49563 {
49568 {
49569 case 5140:
49573 break;
49574 case 5141:
49578 break;
49579 case 5142:
49583 break;
49584 case 5143:
49588 break;
49589 case 5144:
49593 break;
49594 case 5145:
49598 break;
49599 case 5146:
49600 num15 *= (float)Main.DiscoR / 255f;
49601 num16 *= (float)Main.DiscoG / 255f;
49602 num17 *= (float)Main.DiscoB / 255f;
49603 break;
49604 }
49606 }
49607 else if (
type == 282)
49608 {
49610 }
49611 else if (
type == 286)
49612 {
49614 }
49615 else if (
type == 3112)
49616 {
49618 }
49619 else if (
type == 4776)
49620 {
49622 }
49623 else if (
type == 3002)
49624 {
49626 }
49627 else if (
type == 331)
49628 {
49630 }
49631 else if (
type == 183)
49632 {
49634 }
49635 else if (
type == 75)
49636 {
49639 {
49640 Dust dust = Dust.NewDustPerfect(
base.Center +
new Vector2(0f, (
float)
height * 0.2f) + Main.rand.NextVector2CircularEdge(
width, (
float)
height * 0.6f) * (0.3f + Main.rand.NextFloat() * 0.5f), 228,
new Vector2(0f, (0f - Main.rand.NextFloat()) * 0.3f - 1.5f), 127);
49641 dust.scale = 0.5f;
49642 dust.fadeIn = 1.1f;
49643 dust.noGravity = true;
49644 dust.noLight = true;
49645 }
49646 }
49648 {
49651 {
49652 Dust
dust2 = Dust.NewDustPerfect(
base.Center +
new Vector2(0f, (
float)
height * -0.1f) + Main.rand.NextVector2CircularEdge((
float)
width * 0.6f, (
float)
height * 0.6f) * (0.3f + Main.rand.NextFloat() * 0.5f), 279,
new Vector2(0f, (0f - Main.rand.NextFloat()) * 0.3f - 1.5f), 127);
49653 dust2.scale = 0.5f;
49654 dust2.fadeIn = 1.1f;
49655 dust2.noGravity = true;
49656 dust2.noLight = true;
49657 dust2.alpha = 0;
49658 }
49659 }
49660 }
static bool[] WaterTorches