Add BubbleText Logic
This commit is contained in:
@@ -101,6 +101,8 @@ namespace BrewMonster
|
||||
public A3DVECTOR3 m_vAccel; // Accelerate\
|
||||
public byte m_RealmLevel;
|
||||
REINCARNATION_TOME m_ReincarnationTome; // תÉú
|
||||
/// <summary>Used by <see cref="CECPlayer.BubbleText"/> for fight-channel EXP strings (book vs normal).</summary>
|
||||
internal bool IsReincarnationTomeActive => m_ReincarnationTome.tome_active != 0;
|
||||
public bool m_bRushFly = false; // true, in rush fly mode
|
||||
|
||||
private CECCounter m_IncantCnt;
|
||||
@@ -614,7 +616,7 @@ namespace BrewMonster
|
||||
case EC_MsgDef.MSG_PM_PLAYERCHGSHAPE : OnMsgPlayerChgShape(Msg); break;
|
||||
case EC_MsgDef.MSG_HST_SETMOVESTAMP: OnMsgHstSetMoveStamp(Msg); break;
|
||||
case EC_MsgDef.MSG_HST_SANCTUARY: OnMsgHstSanctuary(Msg); break;
|
||||
|
||||
case EC_MsgDef.MSG_HST_RECEIVEEXP: OnMsgHstReceiveExp(Msg); break;
|
||||
default:
|
||||
// Uncomment to debug unhandled messages
|
||||
// Debug.LogWarning($"[CECHostPlayer] ProcessMessage: Unhandled message {msg}");
|
||||
@@ -664,164 +666,6 @@ namespace BrewMonster
|
||||
AddMoneyAmount(-(int)pCmd.cost);
|
||||
}
|
||||
|
||||
private void BubbleText(int iIndex, uint dwNum, int p1 = 0)
|
||||
{
|
||||
bool isHost = IsHostPlayer();
|
||||
|
||||
if (isHost)
|
||||
{
|
||||
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
|
||||
if (iIndex == (int)BubbleTextType.BUBBLE_EXP)
|
||||
{
|
||||
bool hasBookExp = pHost != null && pHost.m_ReincarnationTome.tome_active != 0;
|
||||
int msgId = (int)dwNum > 0 ?
|
||||
(hasBookExp ? (int)FixedMsg.FIXMSG_GOT_BOOKEXP : (int)FixedMsg.FIXMSG_GOTEXP) :
|
||||
(int)FixedMsg.FIXMSG_LOSTEXP;
|
||||
EC_Game.GetGameRun()?.AddFixedChannelMsg(msgId, (int)ChatChannel.GP_CHAT_FIGHT, (int)dwNum);
|
||||
}
|
||||
|
||||
if (iIndex == (int)BubbleTextType.BUBBLE_SP)
|
||||
{
|
||||
EC_Game.GetGameRun()?.AddFixedChannelMsg((int)FixedMsg.FIXMSG_GOTSP, (int)ChatChannel.GP_CHAT_FIGHT, (int)dwNum);
|
||||
}
|
||||
|
||||
if (iIndex == (int)BubbleTextType.BUBBLE_REALMEXP)
|
||||
{
|
||||
EC_Game.GetGameRun()?.AddFixedChannelMsg((int)FixedMsg.FIXMSG_GOT_REALMEXP, (int)ChatChannel.GP_CHAT_FIGHT, (int)dwNum);
|
||||
}
|
||||
}
|
||||
|
||||
Vector3 vPos;
|
||||
if (IsInChariot())
|
||||
{
|
||||
var dummy = GetDummyModel((int)PLAYERMODEL_TYPE.PLAYERMODEL_DUMMYTYPE2);
|
||||
if (dummy != null)
|
||||
{
|
||||
// TODO
|
||||
//vPos = GetPos() + g_vAxisY * (dummy.GetModelAABB().Extents.y * 2.3f);
|
||||
}
|
||||
else
|
||||
{
|
||||
vPos = EC_Utility.ToVector3(GetPos()) + g_vAxisY * (m_aabb.Extents.y * 2.5f);
|
||||
}
|
||||
|
||||
//CECBubbleDecal* pBubbleDecal = m_pBubbleTexts->AddDecal(vPos, CECDecal::DCID_ICONDECAL);
|
||||
//CECIconDecal* pDecal = (CECIconDecal*)pBubbleDecal->GetDecal();
|
||||
|
||||
//switch (iIndex)
|
||||
//{
|
||||
// case BUBBLE_DAMAGE:
|
||||
|
||||
// if (!bHost)
|
||||
// dwCol = A3DCOLORRGB(237, 56, 0);
|
||||
|
||||
// if (p1 & 0x0001)
|
||||
// pDecal->AddIcon(CECImageRes::IMG_DEADLYSTRIKE, 0, dwCol);
|
||||
// else if (p1 & 0x0002)
|
||||
// pDecal->AddIcon(CECImageRes::IMG_RETORT, 0, dwCol);
|
||||
|
||||
// pDecal->AddNumIcons(CECImageRes::IMG_POPUPNUM, dwNum, dwCol);
|
||||
// break;
|
||||
|
||||
// case BUBBLE_EXP:
|
||||
|
||||
// pDecal->AddIcon(CECImageRes::IMG_GOTEXP, 0, dwCol);
|
||||
// pDecal->AddNumIcons(CECImageRes::IMG_POPUPNUM, dwNum, dwCol);
|
||||
// // pDecal->SetScreenPos(80, 70);
|
||||
// // pDecal->EnableScreenPos(true);
|
||||
// break;
|
||||
|
||||
// case BUBBLE_SP:
|
||||
|
||||
// pDecal->AddIcon(CECImageRes::IMG_GOTSP, 0, dwCol);
|
||||
// pDecal->AddNumIcons(CECImageRes::IMG_POPUPNUM, dwNum, dwCol);
|
||||
// // pDecal->SetScreenPos(80, 90);
|
||||
// // pDecal->EnableScreenPos(true);
|
||||
// break;
|
||||
|
||||
// case BUBBLE_MONEY:
|
||||
|
||||
// pDecal->AddIcon(CECImageRes::IMG_GOTMONEY, 0, dwCol);
|
||||
// pDecal->AddNumIcons(CECImageRes::IMG_POPUPNUM, dwNum, dwCol);
|
||||
// break;
|
||||
|
||||
// case BUBBLE_LEVELUP:
|
||||
|
||||
// pDecal->AddIcon(CECImageRes::IMG_LEVELUP, 0, dwCol);
|
||||
// break;
|
||||
|
||||
// case BUBBLE_HITMISSED:
|
||||
|
||||
// if (!bHost)
|
||||
// dwCol = A3DCOLORRGB(237, 56, 0);
|
||||
|
||||
// pDecal->AddIcon(CECImageRes::IMG_HITMISSED, 0, dwCol);
|
||||
// break;
|
||||
|
||||
// case BUBBLE_INVALIDHIT:
|
||||
|
||||
// if (!bHost)
|
||||
// dwCol = A3DCOLORRGB(237, 56, 0);
|
||||
|
||||
// pDecal->AddIcon(CECImageRes::IMG_INVALIDHIT, 0, dwCol);
|
||||
// break;
|
||||
|
||||
// case BUBBLE_IMMUNE:
|
||||
|
||||
// if (!bHost)
|
||||
// dwCol = A3DCOLORRGB(237, 56, 0);
|
||||
|
||||
// pDecal->AddIcon(CECImageRes::IMG_IMMUNE, 0, dwCol);
|
||||
// break;
|
||||
|
||||
// case BUBBLE_HPWARN:
|
||||
|
||||
// dwCol = A3DCOLORRGB(255, 255, 255);
|
||||
// pDecal->AddIcon(CECImageRes::IMG_HPWARN, 0, dwCol);
|
||||
// break;
|
||||
|
||||
// case BUBBLE_MPWARN:
|
||||
|
||||
// dwCol = A3DCOLORRGB(255, 255, 255);
|
||||
// pDecal->AddIcon(CECImageRes::IMG_MPWARN, 0, dwCol);
|
||||
// break;
|
||||
|
||||
// case BUBBLE_REBOUND:
|
||||
|
||||
// pDecal->AddIcon(CECImageRes::IMG_REBOUND, 0, dwCol);
|
||||
// pDecal->AddNumIcons(CECImageRes::IMG_POPUPNUM, dwNum, dwCol);
|
||||
// break;
|
||||
|
||||
// case BUBBLE_BEAT_BACK:
|
||||
|
||||
// pDecal->AddIcon(CECImageRes::IMG_BEAT_BACK, 0, dwCol);
|
||||
// pDecal->AddNumIcons(CECImageRes::IMG_POPUPNUM, dwNum, dwCol);
|
||||
// break;
|
||||
|
||||
// case BUBBLE_ADD:
|
||||
|
||||
// dwCol = A3DCOLORRGB(126, 206, 244);
|
||||
// pDecal->AddIcon(CECImageRes::IMG_ADD, 0, dwCol);
|
||||
// pDecal->AddNumIcons(CECImageRes::IMG_POPUPNUM, dwNum, dwCol);
|
||||
// break;
|
||||
|
||||
// case BUBBLE_DODGE_DEBUFF:
|
||||
|
||||
// if (!bHost)
|
||||
// dwCol = A3DCOLORRGB(237, 56, 0);
|
||||
|
||||
// pDecal->AddIcon(CECImageRes::IMG_DODGE_DEBUFF, 0, dwCol);
|
||||
// break;
|
||||
|
||||
// default:
|
||||
// return;
|
||||
}
|
||||
else
|
||||
{
|
||||
vPos = EC_Utility.ToVector3(GetPos()) + g_vAxisY * (m_aabb.Extents.y * 2.5f);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sell to NPC: server sends ITEM_TO_MONEY. Removes sold items from pack and adds gained money.
|
||||
/// Payload layout differs across server builds, so we parse defensively.
|
||||
@@ -3084,7 +2928,7 @@ namespace BrewMonster
|
||||
EventBus.Publish(new HostPlayerLevelUpUIEvent());
|
||||
|
||||
// // Popup notify bubble text
|
||||
// BubbleText(BUBBLE_LEVELUP, 0);
|
||||
BubbleText((int)BubbleTextType.BUBBLE_LEVELUP, 0);
|
||||
//
|
||||
// // Notify my friends that my level changed
|
||||
// ACHAR szInfo[40];
|
||||
|
||||
Reference in New Issue
Block a user