feat: remove experience
This commit is contained in:
1 parent
bdfe5350cd
commit
41d166afed
83 files changed
+47
-1501
No files matched your search
@@ -56,22 +56,6 @@ HRESULT CXuiCtrlEnchantmentButton::OnGetSourceDataText(XUIMessageGetSourceText *
|
||||
|
||||
int cost = menu->costs[m_index];
|
||||
|
||||
if(cost != m_lastCost)
|
||||
{
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
if(cost > pMinecraft->localplayers[m_iPad]->experienceLevel && !pMinecraft->localplayers[m_iPad]->abilities.instabuild)
|
||||
{
|
||||
// Dark background
|
||||
SetEnable(FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Light background and focus background
|
||||
SetEnable(TRUE);
|
||||
}
|
||||
m_costString = _toString<int>(cost);
|
||||
m_lastCost = cost;
|
||||
}
|
||||
if(cost == 0)
|
||||
{
|
||||
// Dark background
|
||||
|
||||
@@ -122,36 +122,6 @@ HRESULT CXuiCtrlEnchantmentButtonText::OnRender(XUIMessageRender *pRenderData, B
|
||||
}
|
||||
|
||||
glColor4f(1, 1, 1, 1);
|
||||
if (cost != 0)
|
||||
{
|
||||
wstring line = _toString<int>(cost);
|
||||
Font *font = pMinecraft->altFont;
|
||||
//int col = 0x685E4A;
|
||||
unsigned int col = m_textColour;
|
||||
if (pMinecraft->localplayers[m_parentControl->m_iPad]->experienceLevel < cost && !pMinecraft->localplayers[m_parentControl->m_iPad]->abilities.instabuild)
|
||||
{
|
||||
col = m_textDisabledColour;
|
||||
font->drawWordWrap(m_enchantmentString, 0, 0, bwidth/ss, col, bheight/ss);
|
||||
font = pMinecraft->font;
|
||||
//col = (0x80ff20 & 0xfefefe) >> 1;
|
||||
//font->drawShadow(line, (bwidth - font->width(line))/ss, 7, col);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_parentControl->HasFocus())
|
||||
{
|
||||
//col = 0xffff80;
|
||||
col = m_textFocusColour;
|
||||
}
|
||||
font->drawWordWrap(m_enchantmentString, 0, 0, bwidth/ss, col, bheight/ss);
|
||||
font = pMinecraft->font;
|
||||
//col = 0x80ff20;
|
||||
//font->drawShadow(line, (bwidth - font->width(line))/ss, 7, col);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
//Lighting::turnOff();
|
||||
glDisable(GL_RESCALE_NORMAL);
|
||||
|
||||
@@ -141,36 +141,6 @@ HRESULT CXuiSceneHud::OnCustomMessage_TickScene()
|
||||
m_hotbarIcon[j]->SetAlpha( m_hotbarIcon[j]->m_hObj, opacity );
|
||||
}
|
||||
|
||||
// Update xp progress
|
||||
if (pMinecraft->localgameModes[m_iPad]->canHurtPlayer())
|
||||
{
|
||||
int xpNeededForNextLevel = pMinecraft->localplayers[m_iPad]->getXpNeededForNextLevel();
|
||||
int progress = (int)(pMinecraft->localplayers[m_iPad]->experienceProgress *xpNeededForNextLevel);
|
||||
|
||||
m_ExperienceProgress.SetShow(TRUE);
|
||||
m_ExperienceProgress.SetRange(0,xpNeededForNextLevel);
|
||||
m_ExperienceProgress.SetValue(progress);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ExperienceProgress.SetShow(FALSE);
|
||||
}
|
||||
|
||||
// Update xp level
|
||||
if (pMinecraft->localgameModes[m_iPad]->hasExperience() && pMinecraft->localplayers[m_iPad]->experienceLevel > 0)
|
||||
{
|
||||
m_xpLevel.SetShow(TRUE);
|
||||
|
||||
wchar_t formatted[10];
|
||||
swprintf(formatted, 10, L"%d",pMinecraft->localplayers[m_iPad]->experienceLevel);
|
||||
|
||||
m_xpLevel.SetText(formatted);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_xpLevel.SetShow(FALSE);
|
||||
}
|
||||
|
||||
if (pMinecraft->localgameModes[m_iPad]->canHurtPlayer())
|
||||
{
|
||||
m_random.setSeed(m_tickCount * 312871);
|
||||
|
||||
@@ -16,7 +16,6 @@ protected:
|
||||
CXuiControl m_hudScaleGroup; // Contains all the HUD elements except crosshair
|
||||
CXuiControl m_hotbarGroup;
|
||||
CXuiCtrlSlotItem *m_hotbarIcon[9];
|
||||
CXuiProgressBar m_ExperienceProgress;
|
||||
CXuiControl m_healthGroup;
|
||||
CXuiControl m_healthIcon[10];
|
||||
CXuiControl m_armourGroup;
|
||||
@@ -25,7 +24,6 @@ protected:
|
||||
CXuiControl m_foodIcon[10];
|
||||
CXuiControl m_airGroup;
|
||||
CXuiControl m_airIcon[10];
|
||||
CXuiControl m_xpLevel;
|
||||
|
||||
D3DXVECTOR3 m_OriginalPosition;
|
||||
int m_iPad;
|
||||
@@ -58,7 +56,6 @@ protected:
|
||||
MAP_OVERRIDE(IDC_Inventory8, m_hotbarIcon[7])
|
||||
MAP_OVERRIDE(IDC_Inventory9, m_hotbarIcon[8])
|
||||
END_MAP_CHILD_CONTROLS()
|
||||
MAP_CONTROL(IDC_ExperienceProgress, m_ExperienceProgress)
|
||||
MAP_CONTROL(IDC_Health, m_healthGroup)
|
||||
BEGIN_MAP_CHILD_CONTROLS(m_healthGroup)
|
||||
MAP_CONTROL(IDC_Health0, m_healthIcon[0])
|
||||
@@ -111,7 +108,6 @@ protected:
|
||||
MAP_CONTROL(IDC_Air8, m_airIcon[8])
|
||||
MAP_CONTROL(IDC_Air9, m_airIcon[9])
|
||||
END_MAP_CHILD_CONTROLS()
|
||||
MAP_CONTROL(IDC_XPLevel, m_xpLevel)
|
||||
END_MAP_CHILD_CONTROLS()
|
||||
END_MAP_CHILD_CONTROLS()
|
||||
END_MAP_CHILD_CONTROLS()
|
||||
|
||||
Reference in new issue
Block a user