mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-05 03:29:45 -04:00
Foolish items
This commit is contained in:
@@ -109,6 +109,14 @@ int daItemShield_c::__CreateHeap() {
|
||||
int daItemShield_c::create() {
|
||||
fopAcM_ct(this, daItemShield_c);
|
||||
m_itemNo = IF_DUSK(randomizer_IsActive() ? randomizer_getItemAtLocation("Ordon Shield") : ) dItemNo_WOOD_SHIELD_e;
|
||||
#if TARGET_PC
|
||||
// Use home.angle.x as a check to see if we've set the foolish item model or not
|
||||
// Otherwise we end up setting it twice
|
||||
if (randomizer_IsActive() && m_itemNo == dItemNo_Randomizer_FOOLISH_ITEM_e && home.angle.x != 0) {
|
||||
home.angle.z = randomizer_getRandomFoolishItemModelID();
|
||||
home.angle.x = 0;
|
||||
}
|
||||
#endif
|
||||
if (fopAcM_isSwitch(this, getSwBit2())) {
|
||||
OS_REPORT("木の盾:もう取ったので出ません\n");
|
||||
return cPhs_ERROR_e;
|
||||
@@ -119,7 +127,7 @@ int daItemShield_c::create() {
|
||||
if (getSwBit() == 0xff) {
|
||||
OS_REPORT("[43;30m木の盾:スイッチビット指定がありません!\n\x1b[m");
|
||||
}
|
||||
int rv = dComIfG_resLoad(&mPhase, dItem_data::getFieldArc(m_itemNo));
|
||||
int rv = dComIfG_resLoad(&mPhase, dItem_data::getFieldArc(M_ITEMNO_MODEL_ITEM_ID));
|
||||
if (rv == cPhs_COMPLEATE_e) {
|
||||
if (fopAcM_entrySolidHeap(this, CheckFieldItemCreateHeap, 0x820) == 0) {
|
||||
return cPhs_ERROR_e;
|
||||
@@ -338,7 +346,7 @@ int daItemShield_c::draw() {
|
||||
}
|
||||
|
||||
int daItemShield_c::_delete() {
|
||||
daItemBase_c::DeleteBase(dItem_data::getFieldArc(m_itemNo));
|
||||
daItemBase_c::DeleteBase(dItem_data::getFieldArc(M_ITEMNO_MODEL_ITEM_ID));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user