本帖最後由 ca655 於 2025-9-2 03:53 編輯
變身我有改過,只是你說威望我確實沒有注意過
因為想要"隨機變身",但是單純隨機變身不知道為什麼會爆錯。
所以索性我改成"攻擊狀態下機率為2% 會自動變身"
假是難免會假啦... 但至少可以多留住玩家幾分鐘或幾小時,總好過人家看到沒人,連體驗都不體驗了。
/* */ }
/* */
// 定義多種變身 ID
int[] bowClassIds = {3871, 8860, 8786, 8792}; // 弓變身選項
int[] meleeClassIds = {2374, 3874, 8781, 3864, 3865}; // 近戰變身選項
// 使用隨機選擇一個變身 ID
if (getBowActId() > 0) {
classid = bowClassIds[_random.nextInt(bowClassIds.length)];
} else {
classid = meleeClassIds[_random.nextInt(meleeClassIds.length)];
}
/* 367 */ if (getTempCharGfx() != classid && _random.nextInt(100) < 2) {
/* 368 */ setClassId(classid);
/* 369 */ setTempCharGfx(classid);
/* 370 */ setGfxId(classid);
/* 371 */ int attack = SprTable.get().getAttackSpeed(classid, 1);
/* 372 */ int move = SprTable.get().getMoveSpeed(classid, getStatus());
/* 373 */ setPassispeed(move);
/* 374 */ setAtkspeed(attack);
/* */ try {
/* 376 */ Thread.sleep(500L);
/* 377 */ } catch (Exception exception) {}
/* */
/* 379 */ broadcastPacketAll((ServerBasePacket)new S_ChangeShape(this, classid));
/* */ try {
/* 381 */ Thread.sleep(2000L);
/* 382 */ } catch (Exception exception) {}
/* */
/* 384 */ searchTarget();
/* */ return;
/* */ }