Merge branch 'general-devel' of github.com:TShock/TShock into general-devel
This commit is contained in:
commit
15816bc1ad
4 changed files with 13 additions and 13 deletions
|
|
@ -670,7 +670,7 @@ namespace TShockAPI
|
||||||
args.Player.TilePlaceThreshold++;
|
args.Player.TilePlaceThreshold++;
|
||||||
var coords = new Vector2(tileX, tileY);
|
var coords = new Vector2(tileX, tileY);
|
||||||
if (!args.Player.TilesCreated.ContainsKey(coords))
|
if (!args.Player.TilesCreated.ContainsKey(coords))
|
||||||
args.Player.TilesCreated.Add(coords, Main.tile[tileX, tileY]);
|
args.Player.TilesCreated.Add(coords, Main.tile[tileX, tileY].Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((type == 0 || type == 4) && Main.tileSolid[Main.tile[tileX, tileY].type] && !args.Player.Group.HasPermission(Permissions.ignorekilltiledetection))
|
if ((type == 0 || type == 4) && Main.tileSolid[Main.tile[tileX, tileY].type] && !args.Player.Group.HasPermission(Permissions.ignorekilltiledetection))
|
||||||
|
|
@ -678,7 +678,7 @@ namespace TShockAPI
|
||||||
args.Player.TileKillThreshold++;
|
args.Player.TileKillThreshold++;
|
||||||
var coords = new Vector2(tileX, tileY);
|
var coords = new Vector2(tileX, tileY);
|
||||||
if (!args.Player.TilesDestroyed.ContainsKey(coords))
|
if (!args.Player.TilesDestroyed.ContainsKey(coords))
|
||||||
args.Player.TilesDestroyed.Add(coords, Main.tile[tileX, tileY]);
|
args.Player.TilesDestroyed.Add(coords, Main.tile[tileX, tileY].Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -35,5 +35,5 @@ using System.Runtime.InteropServices;
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
|
||||||
[assembly: AssemblyVersion("3.4.1.1224")]
|
[assembly: AssemblyVersion("3.4.1.1229")]
|
||||||
[assembly: AssemblyFileVersion("3.4.1.1224")]
|
[assembly: AssemblyFileVersion("3.4.1.1229")]
|
||||||
|
|
@ -34,8 +34,8 @@ namespace TShockAPI
|
||||||
public int TilePlaceThreshold { get; set; }
|
public int TilePlaceThreshold { get; set; }
|
||||||
public int TileLiquidThreshold { get; set; }
|
public int TileLiquidThreshold { get; set; }
|
||||||
public int ProjectileThreshold { get; set; }
|
public int ProjectileThreshold { get; set; }
|
||||||
public Dictionary<Vector2, Tile> TilesDestroyed { get; protected set; }
|
public Dictionary<Vector2, TileData> TilesDestroyed { get; protected set; }
|
||||||
public Dictionary<Vector2, Tile> TilesCreated { get; protected set; }
|
public Dictionary<Vector2, TileData> TilesCreated { get; protected set; }
|
||||||
public int FirstMaxHP { get; set; }
|
public int FirstMaxHP { get; set; }
|
||||||
public int FirstMaxMP { get; set; }
|
public int FirstMaxMP { get; set; }
|
||||||
public Group Group { get; set; }
|
public Group Group { get; set; }
|
||||||
|
|
@ -168,16 +168,16 @@ namespace TShockAPI
|
||||||
|
|
||||||
public TSPlayer(int index)
|
public TSPlayer(int index)
|
||||||
{
|
{
|
||||||
TilesDestroyed = new Dictionary<Vector2, Tile>();
|
TilesDestroyed = new Dictionary<Vector2, TileData>();
|
||||||
TilesCreated = new Dictionary<Vector2, Tile>();
|
TilesCreated = new Dictionary<Vector2, TileData>();
|
||||||
Index = index;
|
Index = index;
|
||||||
Group = new Group("null");
|
Group = new Group("null");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected TSPlayer(String playerName)
|
protected TSPlayer(String playerName)
|
||||||
{
|
{
|
||||||
TilesDestroyed = new Dictionary<Vector2, Tile>();
|
TilesDestroyed = new Dictionary<Vector2, TileData>();
|
||||||
TilesCreated = new Dictionary<Vector2, Tile>();
|
TilesCreated = new Dictionary<Vector2, TileData>();
|
||||||
Index = -1;
|
Index = -1;
|
||||||
FakePlayer = new Player { name = playerName, whoAmi = -1 };
|
FakePlayer = new Player { name = playerName, whoAmi = -1 };
|
||||||
Group = new Group("null");
|
Group = new Group("null");
|
||||||
|
|
@ -433,12 +433,12 @@ namespace TShockAPI
|
||||||
NetMessage.SendData((int)PacketTypes.NpcStrike, -1, -1, "", npcid, damage, knockBack, hitDirection);
|
NetMessage.SendData((int)PacketTypes.NpcStrike, -1, -1, "", npcid, damage, knockBack, hitDirection);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RevertTiles(Dictionary<Vector2, Tile> tiles)
|
public void RevertTiles(Dictionary<Vector2, TileData> tiles)
|
||||||
{
|
{
|
||||||
// Update Main.Tile first so that when tile sqaure is sent it is correct
|
// Update Main.Tile first so that when tile sqaure is sent it is correct
|
||||||
foreach (KeyValuePair<Vector2, Tile> entry in tiles)
|
foreach (KeyValuePair<Vector2, TileData> entry in tiles)
|
||||||
{
|
{
|
||||||
Main.tile[(int)entry.Key.X, (int)entry.Key.Y] = entry.Value;
|
Main.tile[(int)entry.Key.X, (int)entry.Key.Y].Data = entry.Value;
|
||||||
}
|
}
|
||||||
// Send all players updated tile sqaures
|
// Send all players updated tile sqaures
|
||||||
foreach (Vector2 coords in tiles.Keys)
|
foreach (Vector2 coords in tiles.Keys)
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue