Merge remote-tracking branch 'upstream/master' into master

This commit is contained in:
ThatGamerBlue
2021-04-07 20:25:02 +01:00
18 changed files with 166 additions and 98 deletions

View File

@@ -384,7 +384,7 @@ public class PlayerManager
}
else if (itemComposition.isTradeable())
{
prices.put(id, itemManager.getItemPrice(id, false));
prices.put(id, itemManager.getItemPrice(id));
}
}

View File

@@ -131,13 +131,16 @@ public class ChatMessageManager
case MODCHAT:
{
String sanitizedUsername = Text.removeTags(chatMessage.getName());
boolean isFriend = client.isFriended(sanitizedUsername, true) && !client.getLocalPlayer().getName().equals(sanitizedUsername);
if (isFriend)
if (client.getLocalPlayer().getName().equals(sanitizedUsername))
{
usernameColor = isChatboxTransparent ? chatColorConfig.transparentPlayerUsername() : chatColorConfig.opaquePlayerUsername();
}
else if (client.isFriended(sanitizedUsername, true))
{
usernameColor = isChatboxTransparent ? chatColorConfig.transparentPublicFriendUsernames() : chatColorConfig.opaquePublicFriendUsernames();
}
if (usernameColor == null)
else
{
usernameColor = isChatboxTransparent ? chatColorConfig.transparentUsername() : chatColorConfig.opaqueUsername();
}

View File

@@ -313,6 +313,15 @@ public interface ChatColorConfig extends Config
)
Color opaquePublicFriendUsernames();
@ConfigItem(
position = 28,
keyName = "opaquePlayerUsername",
name = "Your username",
description = "Color of your username",
section = opaqueSection
)
Color opaquePlayerUsername();
@ConfigItem(
position = 51,
keyName = "transparentPublicChat",
@@ -579,4 +588,13 @@ public interface ChatColorConfig extends Config
section = transparentSection
)
Color transparentPublicFriendUsernames();
@ConfigItem(
position = 78,
keyName = "transparentPlayerUsername",
name = "Your username (transparent)",
description = "Color of your username (transparent)",
section = transparentSection
)
Color transparentPlayerUsername();
}

View File

@@ -299,19 +299,6 @@ public class ItemManager
return getItemPriceWithSource(itemID, runeLiteConfig.useWikiItemPrices());
}
/**
* Look up an item's price
*
* @param itemID item id
* @param ignoreUntradeableMap skip untradeables
* @return item price
*/
@Deprecated(since = "4.1.0", forRemoval = true)
public int getItemPrice(int itemID, boolean ignoreUntradeableMap)
{
return getItemPriceWithSource(itemID, runeLiteConfig.useWikiItemPrices(), ignoreUntradeableMap);
}
/**
* Look up an item's price
*
@@ -320,12 +307,6 @@ public class ItemManager
* @return item price
*/
public int getItemPriceWithSource(int itemID, boolean useWikiPrice)
{
return getItemPriceWithSource(itemID, useWikiPrice, false);
}
// TODO: inline this back to getItemPriceWithSource(int, boolean) next minor ver
private int getItemPriceWithSource(int itemID, boolean useWikiPrice, boolean ignoreUntradeableMap)
{
if (itemID == COINS_995)
{
@@ -360,11 +341,6 @@ public class ItemManager
{
for (final ItemMapping mappedItem : mappedItems)
{
if (ignoreUntradeableMap && mappedItem.isUntradeable())
{
continue;
}
price += getItemPriceWithSource(mappedItem.getTradeableItem(), useWikiPrice) * mappedItem.getQuantity();
}
}

View File

@@ -347,7 +347,7 @@ public class DevToolsPlugin extends Plugin
int id = Integer.parseInt(args[0]);
Player localPlayer = client.getLocalPlayer();
localPlayer.setAnimation(id);
localPlayer.setActionFrame(0);
localPlayer.setAnimationFrame(0);
break;
}
case "gfx":