Merge remote-tracking branch 'origin/develop' into feature/chat_01
This commit is contained in:
@@ -876,10 +876,7 @@ namespace BrewMonster
|
||||
|
||||
EventBus.PublishChannel(GetCharacterID(), new ClearComActFlagAllRankNodesEvent(true));
|
||||
PlayAction((int)PLAYER_ACTION_TYPE.ACT_GROUNDDIE);
|
||||
if (PopupManager.Instance != null)
|
||||
{
|
||||
PopupManager.Instance.OnPlayerDied();
|
||||
}
|
||||
PopupManager.NotifyPlayerDied();
|
||||
}
|
||||
|
||||
private bool NormalAttackObject(int idTarget, bool bForceAttack, bool bMoreClose = false)
|
||||
|
||||
@@ -240,15 +240,6 @@ namespace BrewMonster
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ui != null)
|
||||
{
|
||||
ui.UpdateCash(cash.cash_amount);
|
||||
}
|
||||
else
|
||||
{
|
||||
BrewMonster.Scripts.Managers.EC_InventoryUI.CacheCash(cash.cash_amount);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -319,7 +310,7 @@ namespace BrewMonster
|
||||
pItem.SetItemInfo(null, 0);
|
||||
|
||||
#if UNITY_EDITOR
|
||||
Debug.Log($"[Inventory] OWN_ITEM_INFO pkg={byPackage} slot={bySlot} tid={type} count={count} contentLen={content_length}");
|
||||
Debug.Log($"[Inventory] OWN_ITEM_INFO pkg={byPackage} slot={bySlot} tid={type} count={count} contentLen={content_length}");
|
||||
#endif
|
||||
|
||||
if (byPackage == InventoryConst.IVTRTYPE_EQUIPPACK)
|
||||
@@ -780,14 +771,17 @@ namespace BrewMonster
|
||||
}
|
||||
|
||||
m_pPack.RemoveItem(pCmd.chip_idx, 1);
|
||||
|
||||
if (pTessera is EC_IvtrStone stone)
|
||||
{
|
||||
AddMoneyAmount(-(int)stone.GetDBEssence().install_price);
|
||||
}
|
||||
// Refresh equip's data
|
||||
// todo make receive request
|
||||
UnityGameSession.c2s_CmdGetItemInfo(Inventory_type.IVTRTYPE_PACK, pCmd.equip_idx);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void OnMsgHstClearTessera(ECMSG Msg)
|
||||
{
|
||||
cmd_clear_tessera pCmd = GPDataTypeHelper.FromBytes<cmd_clear_tessera>((byte[])Msg.dwParam1);
|
||||
|
||||
@@ -213,6 +213,7 @@ namespace BrewMonster
|
||||
return false;
|
||||
}
|
||||
|
||||
AddMoneyAmount(-pEgg.GetDBEssence().money_hatched);
|
||||
UnityGameSession.c2s_CmdNPCSevHatchPet(iIvtrIdx, pItem.GetTemplateID());
|
||||
|
||||
return true;
|
||||
@@ -248,9 +249,10 @@ namespace BrewMonster
|
||||
return false;
|
||||
}
|
||||
|
||||
AddMoneyAmount(-pdbe.money_restored);
|
||||
UnityGameSession.c2s_CmdNPCSevRestorePet(iPetIdx);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.Scripts;
|
||||
using CSNetwork;
|
||||
using CSNetwork.GPDataType;
|
||||
@@ -35,7 +35,7 @@ namespace BrewMonster
|
||||
}
|
||||
public void OnMsgHstGoto(in ECMSG Msg)
|
||||
{
|
||||
PopupManager.Instance.OnPlayerRevived();
|
||||
PopupManager.NotifyPlayerRevived();
|
||||
// p1 is a byte[] buffer; parse into cmd_notify_hostpos then set position
|
||||
// p1 是一个 byte[] 缓冲区;解析为 cmd_notify_hostpos 然后设置位置
|
||||
byte[] buf = (byte[])Msg.dwParam1;
|
||||
|
||||
@@ -547,6 +547,9 @@ namespace BrewMonster
|
||||
case EC_MsgDef.MSG_HST_PICKUPMONEY:
|
||||
OnMsgHstPickupMoney(Msg);
|
||||
break;
|
||||
case EC_MsgDef.MSG_HST_SPENDMONEY:
|
||||
OnMsgHstSpendMoney(Msg);
|
||||
break;
|
||||
case EC_MsgDef.MSG_HST_ATKRESULT: OnMsgHstAttackResult(Msg); break;
|
||||
case EC_MsgDef.MSG_HST_ATTACKONCE: OnMsgHstAttackOnce(Msg); break;
|
||||
case EC_MsgDef.MSG_HST_ATTACKED: OnMsgHstAttacked(Msg); break;
|
||||
@@ -630,6 +633,16 @@ namespace BrewMonster
|
||||
BubbleText((int)BubbleTextType.BUBBLE_MONEY, (uint)pCmd.amount);
|
||||
}
|
||||
|
||||
private void OnMsgHstSpendMoney(ECMSG msg)
|
||||
{
|
||||
var data = msg.dwParam1 as byte[];
|
||||
if (data == null || data.Length == 0)
|
||||
return;
|
||||
|
||||
cmd_spend_money pCmd = GPDataTypeHelper.FromBytes<cmd_spend_money>(data);
|
||||
AddMoneyAmount(-(int)pCmd.cost);
|
||||
}
|
||||
|
||||
private void BubbleText(int iIndex, uint dwNum, int p1 = 0)
|
||||
{
|
||||
bool isHost = IsHostPlayer();
|
||||
@@ -1441,9 +1454,11 @@ namespace BrewMonster
|
||||
//m_pWorkMan.StartWork_p0(pWork);
|
||||
EventBus.PublishChannel(GetCharacterID(), new ClearComActFlagAllRankNodesEvent(true));
|
||||
PlayAction((int)PLAYER_ACTION_TYPE.ACT_GROUNDDIE);
|
||||
PopupManager.NotifyPlayerDied();
|
||||
}
|
||||
else
|
||||
{
|
||||
PopupManager.NotifyPlayerRevived();
|
||||
UnityGameSession.c2s_CmdGetAllData(true, true, false);
|
||||
UnityGameSession.c2s_CmdSendEnterPKPrecinct();
|
||||
UnityGameSession.RequesrQueryPlayerCash();
|
||||
@@ -2619,7 +2634,7 @@ namespace BrewMonster
|
||||
{
|
||||
/* CECGameUIMan pGameUI = g_pGame.GetGameRun().GetUIManager().GetInGameUIMan();
|
||||
pGameUI.PopupReviveDialog(true);*/
|
||||
PopupManager.Instance.OnPlayerDied();
|
||||
PopupManager.NotifyPlayerDied();
|
||||
}
|
||||
m_bEnterGame = true;
|
||||
}
|
||||
|
||||
@@ -171,8 +171,8 @@ public static class EC_Utility
|
||||
{
|
||||
suffix = data.action_weapon_suffix[weaponType].Suffix ?? string.Empty;
|
||||
}
|
||||
var midBodyFixed = FixGBKString(midBody);
|
||||
return $"{prefix}{midBodyFixed}{suffix}";
|
||||
//var midBodyFixed = FixGBKString(midBody);
|
||||
return $"{prefix}{midBody}{suffix}";
|
||||
}
|
||||
public static byte glb_BuildBLSMask()
|
||||
{
|
||||
|
||||
@@ -133,6 +133,7 @@ namespace BrewMonster
|
||||
//peek next if IsForceStopPrevious is true, force end
|
||||
if (_animationQueue.Peek().IsForceStopPrevious)
|
||||
{
|
||||
Debug.Log($" InternalPlayAnimation PlayNext: Force Stop Previous");
|
||||
_currentState.Stop();
|
||||
_currentState = null;
|
||||
}
|
||||
@@ -173,7 +174,7 @@ namespace BrewMonster
|
||||
/// <param name="fadeMode"></param>
|
||||
private void InternalPlayAnimation(string animationName, float duration = FadeTime, FadeMode fadeMode = FadeMode)
|
||||
{
|
||||
|
||||
//Debug.Log($"InternalPlayAnimation: animationName FUllNAME={animationName}");
|
||||
string fullName = animationName;
|
||||
string removeShapeName = animationName;
|
||||
string removeFlyName = animationName;
|
||||
@@ -183,17 +184,12 @@ namespace BrewMonster
|
||||
|
||||
removeShapeName = animationName.Substring(underscoreIndex + 1);
|
||||
}
|
||||
if (isDebug)
|
||||
{
|
||||
BMLogger.LogError($"InternalPlayAnimation: original={animationName}, removeShapeName={removeShapeName}");
|
||||
}
|
||||
|
||||
|
||||
bool isState = namedAnimancer.States.TryGet(removeShapeName, out var existingState) ? true : false;
|
||||
if (isState)
|
||||
{
|
||||
_currentState = namedAnimancer.TryPlay(removeShapeName, duration / 1000, fadeMode);
|
||||
_currentAnimationName = removeShapeName;
|
||||
//Debug.Log($"InternalPlayAnimation: removeShapeName 1 TriggerName={removeShapeName}");
|
||||
return;
|
||||
}
|
||||
bool isState2 = namedAnimancer.States.TryGet(fullName, out var existingState2) ? true : false;
|
||||
@@ -203,10 +199,11 @@ namespace BrewMonster
|
||||
_currentAnimationName = fullName;
|
||||
return;
|
||||
}
|
||||
string fullName2 = fullName;
|
||||
//if contain 空拳 change it to 通用 apply to full name and removeShapeName
|
||||
if (fullName.Contains("空拳"))
|
||||
if (fullName2.Contains("空拳"))
|
||||
{
|
||||
fullName = fullName.Replace("空拳", "通用");
|
||||
fullName2 = fullName2.Replace("空拳", "通用");
|
||||
removeShapeName = removeShapeName.Replace("空拳", "通用");
|
||||
}
|
||||
bool isState3 = namedAnimancer.States.TryGet(removeShapeName, out var existingState3) ? true : false;
|
||||
@@ -216,11 +213,11 @@ namespace BrewMonster
|
||||
_currentAnimationName = removeShapeName;
|
||||
return;
|
||||
}
|
||||
bool isState4 = namedAnimancer.States.TryGet(fullName, out var existingState4) ? true : false;
|
||||
bool isState4 = namedAnimancer.States.TryGet(fullName2, out var existingState4) ? true : false;
|
||||
if (isState4)
|
||||
{
|
||||
_currentState = namedAnimancer.TryPlay(fullName, duration / 1000, fadeMode);
|
||||
_currentAnimationName = fullName;
|
||||
_currentState = namedAnimancer.TryPlay(fullName2, duration / 1000, fadeMode);
|
||||
_currentAnimationName = fullName2;
|
||||
return;
|
||||
}
|
||||
int index = removeShapeName.IndexOf("空中");
|
||||
@@ -239,7 +236,35 @@ namespace BrewMonster
|
||||
_currentAnimationName = removeFlyName;
|
||||
return;
|
||||
}
|
||||
BMLogger.LogError($"Null name animation: {removeFlyName}");
|
||||
if (fullName2.Contains("_通用"))
|
||||
{
|
||||
fullName2 = fullName2.Replace("_通用", "");
|
||||
removeShapeName = removeShapeName.Replace("_通用", "");
|
||||
removeFlyName = removeFlyName.Replace("_通用", "");
|
||||
}
|
||||
bool isState6 = namedAnimancer.States.TryGet(fullName2, out var existingState6) ? true : false;
|
||||
if (isState6)
|
||||
{
|
||||
_currentState = namedAnimancer.TryPlay(fullName2, duration / 1000, fadeMode);
|
||||
_currentAnimationName = fullName2;
|
||||
return;
|
||||
}
|
||||
|
||||
bool isState8 = namedAnimancer.States.TryGet(removeShapeName, out var existingState8) ? true : false;
|
||||
if (isState8)
|
||||
{
|
||||
_currentState = namedAnimancer.TryPlay(removeShapeName, duration / 1000, fadeMode);
|
||||
_currentAnimationName = removeShapeName;
|
||||
return;
|
||||
}
|
||||
bool isState7 = namedAnimancer.States.TryGet(removeFlyName, out var existingState7) ? true : false;
|
||||
if (isState7)
|
||||
{
|
||||
_currentState = namedAnimancer.TryPlay(removeFlyName, duration / 1000, fadeMode);
|
||||
_currentAnimationName = removeFlyName;
|
||||
return;
|
||||
}
|
||||
BMLogger.LogError($"Null name animation: {fullName}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user