Fix loading special nodes from legacy scenarios
This commit is contained in:
@@ -168,6 +168,9 @@ void cSpecial::append(legacy::special_node_type& old){
|
|||||||
pictype = PIC_DLOG;
|
pictype = PIC_DLOG;
|
||||||
m3 = m2;
|
m3 = m2;
|
||||||
m2 = -1;
|
m2 = -1;
|
||||||
|
if(old.type == 55) type = eSpecType::ONCE_DIALOG;
|
||||||
|
else if(old.type == 58) type = eSpecType::ONCE_GIVE_ITEM_DIALOG;
|
||||||
|
else type = eSpecType::TOWN_PORTAL;
|
||||||
break;
|
break;
|
||||||
case 57: case 60: // Large dialogs with monster graphics
|
case 57: case 60: // Large dialogs with monster graphics
|
||||||
if(pic >= 400 && pic < 1000)
|
if(pic >= 400 && pic < 1000)
|
||||||
@@ -185,8 +188,10 @@ void cSpecial::append(legacy::special_node_type& old){
|
|||||||
m2 = -1;
|
m2 = -1;
|
||||||
if(old.type == 56) type = eSpecType::ONCE_DIALOG;
|
if(old.type == 56) type = eSpecType::ONCE_DIALOG;
|
||||||
else if(old.type == 59) type = eSpecType::ONCE_GIVE_ITEM_DIALOG;
|
else if(old.type == 59) type = eSpecType::ONCE_GIVE_ITEM_DIALOG;
|
||||||
|
else type = eSpecType::TOWN_LEVER;
|
||||||
break;
|
break;
|
||||||
case 190: // Large stairway dialog
|
case 190: // Large stairway dialog
|
||||||
|
type = eSpecType::TOWN_STAIR;
|
||||||
pic = 19;
|
pic = 19;
|
||||||
pictype = PIC_DLOG;
|
pictype = PIC_DLOG;
|
||||||
m3 = m2;
|
m3 = m2;
|
||||||
@@ -210,6 +215,8 @@ void cSpecial::append(legacy::special_node_type& old){
|
|||||||
ex1b = 108; // Spell ID for ritual of sanctification, as seen in cast_town_spell()
|
ex1b = 108; // Spell ID for ritual of sanctification, as seen in cast_town_spell()
|
||||||
break;
|
break;
|
||||||
case 99: case 100: // Add mage/priest spell TODO: Merge these by adding 100 if it's a priest spell
|
case 99: case 100: // Add mage/priest spell TODO: Merge these by adding 100 if it's a priest spell
|
||||||
|
if(old.type == 99) type = eSpecType::AFFECT_MAGE_SPELL;
|
||||||
|
else type = eSpecType::AFFECT_PRIEST_SPELL;
|
||||||
ex1a += 30;
|
ex1a += 30;
|
||||||
ex1b = 0; // Meaning give spell, not take
|
ex1b = 0; // Meaning give spell, not take
|
||||||
break;
|
break;
|
||||||
@@ -247,6 +254,7 @@ void cSpecial::append(legacy::special_node_type& old){
|
|||||||
ex2b = 0;
|
ex2b = 0;
|
||||||
break;
|
break;
|
||||||
case 154: // text response
|
case 154: // text response
|
||||||
|
type = eSpecType::IF_TEXT_RESPONSE;
|
||||||
ex1a -= 160;
|
ex1a -= 160;
|
||||||
break;
|
break;
|
||||||
case 229: // Outdoor store - fix spell IDs
|
case 229: // Outdoor store - fix spell IDs
|
||||||
@@ -299,9 +307,11 @@ void cSpecial::append(legacy::special_node_type& old){
|
|||||||
ex1a = -ex1a;
|
ex1a = -ex1a;
|
||||||
break;
|
break;
|
||||||
case 193: // Split party
|
case 193: // Split party
|
||||||
|
type = eSpecType::TOWN_SPLIT_PARTY;
|
||||||
if(ex2a > 0) ex2a = 10;
|
if(ex2a > 0) ex2a = 10;
|
||||||
break;
|
break;
|
||||||
case 194: // Reunite party
|
case 194: // Reunite party
|
||||||
|
type = eSpecType::TOWN_REUNITE_PARTY;
|
||||||
if(ex1a > 0) ex1a = 10;
|
if(ex1a > 0) ex1a = 10;
|
||||||
ex2a = 0;
|
ex2a = 0;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user