Skip spells with missing glyph data and print a warning to the console instead, fixes #384
This commit is contained in:
@@ -553,6 +553,12 @@ public class ClientProxy extends CommonProxy {
|
|||||||
data.randomDescriptions = new HashMap<>();
|
data.randomDescriptions = new HashMap<>();
|
||||||
|
|
||||||
for(Spell spell : Spell.getAllSpells()){
|
for(Spell spell : Spell.getAllSpells()){
|
||||||
|
|
||||||
|
if(spell.networkID() > message.names.size()){
|
||||||
|
Wizardry.logger.warn("Received no glyph data for spell {}, skipping", spell.getRegistryName());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// -1 because the none spell isn't included
|
// -1 because the none spell isn't included
|
||||||
// This is a case where we must use the network ID, not the metadata
|
// This is a case where we must use the network ID, not the metadata
|
||||||
data.randomNames.put(spell, message.names.get(spell.networkID() - 1));
|
data.randomNames.put(spell, message.names.get(spell.networkID() - 1));
|
||||||
|
|||||||
Reference in New Issue
Block a user