Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ PickWall()

void Terraria.Player.PickWall ( int x,
int y,
int damage )
inline

Definition at line 43719 of file Player.cs.

43720 {
43721 int tileId = hitTile.HitObject(x, y, 2);
43722 if (hitTile.AddDamage(tileId, damage) >= 100)
43723 {
43725 ClearMiningCacheAt(x, y, 2);
43726 WorldGen.KillWall(x, y);
43727 if (Main.netMode == 1)
43728 {
43729 NetMessage.SendData(17, -1, -1, null, 2, x, y);
43730 }
43731 }
43732 else
43733 {
43734 WorldGen.KillWall(x, y, fail: true);
43735 if (Main.netMode == 1)
43736 {
43737 NetMessage.SendData(17, -1, -1, null, 2, x, y, 1f);
43738 }
43739 }
43740 if (damage != 0)
43741 {
43742 hitTile.Prune();
43743 }
43744 }
void Clear(int tileId)
Definition HitTile.cs:232
int AddDamage(int tileId, int damageAmount, bool updateAmount=true)
Definition HitTile.cs:177
int HitObject(int x, int y, int hitType)
Definition HitTile.cs:141
HitTile hitTile
Definition Player.cs:1323
void ClearMiningCacheAt(int x, int y, int hitTileCacheType)
Definition Player.cs:50311

References System.Collections.Generic.Dictionary< TKey, TValue >.Clear(), Terraria.WorldGen.KillWall(), Terraria.Main.netMode, and Terraria.NetMessage.SendData().