Merge pull request #565 from Olink/general-devel

Fix spawn boss items.
This commit is contained in:
k0rd 2013-10-01 15:14:21 -07:00
commit c29ad54621

View file

@ -3121,7 +3121,9 @@ namespace TShockAPI
var invasion = -1;
var plr = args.Data.ReadInt32();
var Type = args.Data.ReadInt32();
spawnboss = (Type == 4 || Type == 13 || (Type == 50 || Type == 125) || (Type == 126 || Type == 134 || (Type == (int) sbyte.MaxValue || Type == 128)));
NPC npc = new NPC();
npc.SetDefaults(Type);
spawnboss = npc.boss;
if (!spawnboss)
{
switch (Type)
@ -3158,32 +3160,8 @@ namespace TShockAPI
case -1:
boss = "a Goblin Invasion";
break;
case 4:
boss = "the Eye of Cthulhu";
break;
case 13:
boss = "the Eater of Worlds";
break;
case 50:
boss = "the King Slime";
break;
case 125:
boss = "Retinazer";
break;
case 126:
boss = "Spazmatism";
break;
case 134:
boss = "the Destroyer";
break;
case sbyte.MaxValue:
boss = "Skeleton Prime";
break;
case 128:
boss = "Skeleton Prime";
break;
default:
boss = "error";
boss = String.Format("the {0}", npc.name);
break;
}
@ -3237,11 +3215,7 @@ namespace TShockAPI
return true;
byte style = 0;
var isNPC = false;
if ((flag & 1) == 1)
{
isNPC = true;
}
var isNPC = false || (flag & 1) == 1;
if ((flag & 2) != 2)
{