Level 120: QUEST_INFO size fix, boss melee range 800 (hydra)
- questpc.cpp: SendQuestInfoPakcet built the optional fields after sending the header, so qi.size was short and the client parsed the rest as a new packet. - battle.cpp: a non-PC victim of rank BOSS or higher allows 800 melee distance. The ship-defence hydra 6812 sits on the water ~620 from the deck, and the old 300 (AVA2: 600) dropped every hit as VICTIM_FAR. - docs: snow / ship / party run status. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
3c0141d639
commit
c9268424ab
@@ -138,6 +138,12 @@ int battle_melee_attack(LPCHARACTER ch, LPCHARACTER victim)
|
||||
// PC일 경우 상대가 melee 몹일 경우 몹의 공격 거리가 최대 공격 거리
|
||||
if (false == victim->IsPC() && BATTLE_TYPE_MELEE == victim->GetMobBattleType())
|
||||
max = MAX(300, (int) (victim->GetMobAttackRange() * 1.15f));
|
||||
|
||||
// A boss body can be far wider than 300 (the hydra 6812 is out on the water and the deck
|
||||
// stops a player about 620 from its centre). The client already allows 500 from a boss
|
||||
// centre on its odd x/z test, so the server allows 800 for a boss.
|
||||
if (false == victim->IsPC() && victim->GetMobRank() >= MOB_RANK_BOSS)
|
||||
max = MAX(max, 800);
|
||||
}
|
||||
|
||||
if (distance > max)
|
||||
|
||||
@@ -241,8 +241,8 @@ namespace quest
|
||||
qi.index = m_RunningQuestState->iIndex;
|
||||
qi.flag = m_iSendToClient;
|
||||
|
||||
// The optional fields go into buf first so qi.size is final before the header is sent.
|
||||
TEMP_BUFFER buf;
|
||||
buf.write(&qi, sizeof(qi));
|
||||
|
||||
if (m_iSendToClient & QUEST_SEND_ISBEGIN)
|
||||
{
|
||||
@@ -299,7 +299,14 @@ namespace quest
|
||||
sys_log(1, "QUEST Icon File %s", m_RunningQuestState->_icon_file.c_str());
|
||||
}
|
||||
|
||||
CQuestManager::instance().GetCurrentCharacterPtr()->GetDesc()->Packet(buf.read_peek(),buf.size());
|
||||
LPDESC d = CQuestManager::instance().GetCurrentCharacterPtr()->GetDesc();
|
||||
if (buf.size())
|
||||
{
|
||||
d->BufferedPacket(&qi, sizeof(qi));
|
||||
d->Packet(buf.read_peek(), buf.size());
|
||||
}
|
||||
else
|
||||
d->Packet(&qi, sizeof(qi));
|
||||
|
||||
m_iSendToClient = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user