refactor(Core): SendDirectMessage (#23230)

This commit is contained in:
天鹭
2025-10-31 01:21:26 +08:00
committed by GitHub
parent b737fc8b59
commit a1c8e0f221
57 changed files with 236 additions and 236 deletions

View File

@@ -199,7 +199,7 @@ public:
WorldPacket data(SMSG_UPDATE_INSTANCE_ENCOUNTER_UNIT, 4);
data << uint32(ENCOUNTER_FRAME_REFRESH_FRAMES);
_owner->GetSession()->SendPacket(&data);
_owner->SendDirectMessage(&data);
return true;
}

View File

@@ -196,7 +196,7 @@ public:
data << uint32(VEHICLE_SPELL_RIDE_HARDCODED);
data << uint8(SPELL_FAILED_CUSTOM_ERROR);
data << uint32(SPELL_CUSTOM_ERROR_MUST_HAVE_LANCE_EQUIPPED);
clicker->ToPlayer()->GetSession()->SendPacket(&data);
clicker->ToPlayer()->SendDirectMessage(&data);
return false;
}
};

View File

@@ -2272,7 +2272,7 @@ class spell_igb_overheat_aura : public AuraScript
WorldPacket data(SMSG_CLIENT_CONTROL_UPDATE, GetUnitOwner()->GetPackGUID().size() + 1);
data << GetUnitOwner()->GetPackGUID();
data << uint8(value);
player->GetSession()->SendPacket(&data);
player->SendDirectMessage(&data);
}
}
}

View File

@@ -375,7 +375,7 @@ void SendPacketToPlayers(WorldPacket const* data, Unit* source)
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
if (Player* player = itr->GetSource())
if (player->GetAreaId() == AREA_THE_FROZEN_THRONE)
player->GetSession()->SendPacket(data);
player->SendDirectMessage(data);
}
struct ShadowTrapLKTargetSelector

View File

@@ -184,7 +184,7 @@ public:
data << spellId;
data << uint8(SPELL_FAILED_CUSTOM_ERROR);
data << uint32(SPELL_CUSTOM_ERROR_CANT_BUILD_MORE_VEHICLES);
player->GetSession()->SendPacket(&data);
player->SendDirectMessage(&data);
}
return true;
}