Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Ear cleanup #2 #2100

Merged
merged 2 commits into from
Oct 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2319,7 +2319,7 @@ void RecreateEar(int ii, WORD ic, int iseed, int Id, int dur, int mdur, int ch,
tempstr[15] = ibuff & 0x7F;
tempstr[16] = '\0';
sprintf(item[ii]._iName, "Ear of %s", tempstr);
item[ii]._iCurs = ((ivalue >> 6) & 3) + 19;
item[ii]._iCurs = ((ivalue >> 6) & 3) + ICURS_EAR_SORCEROR;
item[ii]._ivalue = ivalue & 0x3F;
item[ii]._iCreateInfo = ic;
item[ii]._iSeed = iseed;
Expand Down
6 changes: 3 additions & 3 deletions Source/msg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ void NetSendCmdGItem(BOOL bHiPri, BYTE bCmd, BYTE mast, BYTE pnum, BYTE ii)
cmd.bMDur = item[ii]._iName[15];
cmd.bCh = item[ii]._iName[16];
cmd.bMCh = item[ii]._iName[17];
cmd.wValue = item[ii]._ivalue | (item[ii]._iName[18] << 8) | ((item[ii]._iCurs - 19) << 6);
cmd.wValue = item[ii]._ivalue | (item[ii]._iName[18] << 8) | ((item[ii]._iCurs - ICURS_EAR_SORCEROR) << 6);
cmd.dwBuff = item[ii]._iName[22] | ((item[ii]._iName[21] | ((item[ii]._iName[20] | (item[ii]._iName[19] << 8)) << 8)) << 8);
} else {
cmd.wCI = item[ii]._iCreateInfo;
Expand Down Expand Up @@ -863,7 +863,7 @@ void NetSendCmdPItem(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y)
cmd.bMDur = plr[myplr].HoldItem._iName[15];
cmd.bCh = plr[myplr].HoldItem._iName[16];
cmd.bMCh = plr[myplr].HoldItem._iName[17];
cmd.wValue = plr[myplr].HoldItem._ivalue | (plr[myplr].HoldItem._iName[18] << 8) | ((plr[myplr].HoldItem._iCurs - 19) << 6);
cmd.wValue = plr[myplr].HoldItem._ivalue | (plr[myplr].HoldItem._iName[18] << 8) | ((plr[myplr].HoldItem._iCurs - ICURS_EAR_SORCEROR) << 6);
cmd.dwBuff = plr[myplr].HoldItem._iName[22] | ((plr[myplr].HoldItem._iName[21] | ((plr[myplr].HoldItem._iName[20] | (plr[myplr].HoldItem._iName[19] << 8)) << 8)) << 8);
} else {
cmd.wCI = plr[myplr].HoldItem._iCreateInfo;
Expand Down Expand Up @@ -928,7 +928,7 @@ void NetSendCmdDItem(BOOL bHiPri, int ii)
cmd.bMDur = item[ii]._iName[15];
cmd.bCh = item[ii]._iName[16];
cmd.bMCh = item[ii]._iName[17];
cmd.wValue = item[ii]._ivalue | (item[ii]._iName[18] << 8) | ((item[ii]._iCurs - 19) << 6);
cmd.wValue = item[ii]._ivalue | (item[ii]._iName[18] << 8) | ((item[ii]._iCurs - ICURS_EAR_SORCEROR) << 6);
cmd.dwBuff = item[ii]._iName[22] | ((item[ii]._iName[21] | ((item[ii]._iName[20] | (item[ii]._iName[19] << 8)) << 8)) << 8);
} else {
cmd.wCI = item[ii]._iCreateInfo;
Expand Down
2 changes: 1 addition & 1 deletion Source/pack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static void PackItem(PkItemStruct *id, ItemStruct *is)
id->bMDur = is->_iName[15];
id->bCh = is->_iName[16];
id->bMCh = is->_iName[17];
id->wValue = is->_ivalue | (is->_iName[18] << 8) | ((is->_iCurs - 19) << 6);
id->wValue = is->_ivalue | (is->_iName[18] << 8) | ((is->_iCurs - ICURS_EAR_SORCEROR) << 6);
id->dwBuff = is->_iName[22] | ((is->_iName[21] | ((is->_iName[20] | (is->_iName[19] << 8)) << 8)) << 8);
} else {
id->iSeed = is->_iSeed;
Expand Down