mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
-externalized AP costs for attachments or an attachment-by-attachment basis
-added APCost to Attachments.xml git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@475 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -50,7 +50,7 @@ struct
|
||||
|
||||
INT8 szCharData[MAX_CHAR_DATA_LENGTH+1];
|
||||
|
||||
UINT16 curAttachment[2];
|
||||
UINT16 curAttachment[3];
|
||||
UINT32 maxArraySize;
|
||||
UINT32 curIndex;
|
||||
UINT32 currentDepth;
|
||||
@@ -84,6 +84,7 @@ attachmentStartElementHandle(void *userData, const char *name, const char **atts
|
||||
}
|
||||
else if(pData->curElement == ELEMENT &&
|
||||
(strcmp(name, "attachmentIndex") == 0 ||
|
||||
strcmp(name, "APCost") == 0 ||
|
||||
strcmp(name, "itemIndex") == 0 ))
|
||||
{
|
||||
pData->curElement = ELEMENT_PROPERTY;
|
||||
@@ -143,6 +144,11 @@ attachmentEndElementHandle(void *userData, const char *name)
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curAttachment[1] = (UINT16) atol(pData->szCharData);
|
||||
}
|
||||
else if(strcmp(name, "APCost") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curAttachment[2] = (UINT16) atol(pData->szCharData);
|
||||
}
|
||||
|
||||
pData->maxReadDepth--;
|
||||
}
|
||||
@@ -234,6 +240,7 @@ BOOLEAN WriteAttachmentStats()
|
||||
|
||||
FilePrintf(hFile,"\t\t<attachmentIndex>%d</attachmentIndex>\r\n", Attachment[cnt][0]);
|
||||
FilePrintf(hFile,"\t\t<itemIndex>%d</itemIndex>\r\n", Attachment[cnt][1]);
|
||||
FilePrintf(hFile,"\t\t<APCost>%d</APCost>\r\n", Attachment[cnt][2]);
|
||||
|
||||
FilePrintf(hFile,"\t</ATTACHMENT>\r\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user