mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
* small bugfix
This commit is contained in:
parent
dc863f459c
commit
ad68aa3dea
@ -174,7 +174,7 @@ void CAmbarCendamo::deh3m()
|
|||||||
{
|
{
|
||||||
map.vicConDetails = new VicCon0();
|
map.vicConDetails = new VicCon0();
|
||||||
((VicCon0*)map.vicConDetails)->ArtifactID = bufor[i+2];
|
((VicCon0*)map.vicConDetails)->ArtifactID = bufor[i+2];
|
||||||
nr=2;
|
nr=(map.version==RoE ? 1 : 2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case gatherTroop:
|
case gatherTroop:
|
||||||
@ -183,8 +183,8 @@ void CAmbarCendamo::deh3m()
|
|||||||
int temp1 = bufor[i+2];
|
int temp1 = bufor[i+2];
|
||||||
int temp2 = bufor[i+3];
|
int temp2 = bufor[i+3];
|
||||||
((VicCon1*)map.vicConDetails)->monsterID = bufor[i+2];
|
((VicCon1*)map.vicConDetails)->monsterID = bufor[i+2];
|
||||||
((VicCon1*)map.vicConDetails)->neededQuantity=readNormalNr(i+4);
|
((VicCon1*)map.vicConDetails)->neededQuantity=readNormalNr(i+(map.version==RoE ? 3 : 4));
|
||||||
nr=6;
|
nr=(map.version==RoE ? 5 : 6);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case gatherResource:
|
case gatherResource:
|
||||||
@ -1256,10 +1256,20 @@ void CAmbarCendamo::deh3m()
|
|||||||
case EDefType::TOWN_DEF:
|
case EDefType::TOWN_DEF:
|
||||||
{
|
{
|
||||||
CCastleObjInfo * spec = new CCastleObjInfo;
|
CCastleObjInfo * spec = new CCastleObjInfo;
|
||||||
spec->bytes[0] = bufor[i]; ++i;
|
if(map.version!=RoE)
|
||||||
spec->bytes[1] = bufor[i]; ++i;
|
{
|
||||||
spec->bytes[2] = bufor[i]; ++i;
|
spec->bytes[0] = bufor[i]; ++i;
|
||||||
spec->bytes[3] = bufor[i]; ++i;
|
spec->bytes[1] = bufor[i]; ++i;
|
||||||
|
spec->bytes[2] = bufor[i]; ++i;
|
||||||
|
spec->bytes[3] = bufor[i]; ++i;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
spec->bytes[0] = 0;
|
||||||
|
spec->bytes[1] = 0;
|
||||||
|
spec->bytes[2] = 0;
|
||||||
|
spec->bytes[3] = 0;
|
||||||
|
}
|
||||||
spec->player = bufor[i]; ++i;
|
spec->player = bufor[i]; ++i;
|
||||||
|
|
||||||
bool hasName = bufor[i]; ++i;
|
bool hasName = bufor[i]; ++i;
|
||||||
|
6
map.cpp
6
map.cpp
@ -130,7 +130,7 @@ CMapHeader::CMapHeader(unsigned char *map)
|
|||||||
{
|
{
|
||||||
this->vicConDetails = new VicCon0();
|
this->vicConDetails = new VicCon0();
|
||||||
((VicCon0*)this->vicConDetails)->ArtifactID = map[i+2];
|
((VicCon0*)this->vicConDetails)->ArtifactID = map[i+2];
|
||||||
nr=2;
|
nr=(version==RoE ? 1 : 2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case gatherTroop:
|
case gatherTroop:
|
||||||
@ -139,8 +139,8 @@ CMapHeader::CMapHeader(unsigned char *map)
|
|||||||
int temp1 = map[i+2];
|
int temp1 = map[i+2];
|
||||||
int temp2 = map[i+3];
|
int temp2 = map[i+3];
|
||||||
((VicCon1*)this->vicConDetails)->monsterID = map[i+2];
|
((VicCon1*)this->vicConDetails)->monsterID = map[i+2];
|
||||||
((VicCon1*)this->vicConDetails)->neededQuantity=readNormalNr(map, i+4);
|
((VicCon1*)this->vicConDetails)->neededQuantity=readNormalNr(map, i+(version==RoE ? 3 : 4));
|
||||||
nr=6;
|
nr=(version==RoE ? 5 : 6);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case gatherResource:
|
case gatherResource:
|
||||||
|
Loading…
Reference in New Issue
Block a user