[solved] Broadcast / privlevel > 1 cant read

For any problems with Dawn of Light website or game server, please direct questions and problems here.

Moderator: Support Team

[solved] Broadcast / privlevel > 1 cant read

Postby Carnifexe » Sun Jul 13, 2014 12:00 am

i checked the normal serverrules that we used

normalserverrules.cs
Code: Select all
public override bool IsAllowedToUnderstand(GameLiving source, GamePlayer target) { if(source == null || target == null) return false; // clients with priv level > 1 are allowed to talk and hear anyone if(source is GamePlayer && ((GamePlayer)source).Client.Account.PrivLevel > 1) return true; if(target.Client.Account.PrivLevel > 1) return true; //Peace flag NPCs can be understood by everyone if (source is GameNPC) if ((((GameNPC)source).Flags & GameNPC.eFlags.PEACE) != 0) return true; if(source.Realm > 0 && source.Realm != target.Realm) return false; return true; }
we got the realm chat also Realm = 5,

broadcast.cs
Code: Select all
private void Broadcast(GamePlayer player, string message) { foreach (GamePlayer p in GetTargets(player)) { if (GameServer.ServerRules.IsAllowedToUnderstand(p, player) || ((eBroadcastType)ServerProperties.Properties.BROADCAST_TYPE == eBroadcastType.Server)) { p.Out.SendMessage(LanguageMgr.GetTranslation(player.Client.Account.Language, "Scripts.Players.Broadcast.Message", player.Name, message), eChatType.CT_Broadcast, eChatLoc.CL_ChatWindow); } } }
player realm 1 cant read 2 and 3 its perfect but privlevel > 1 cant read all 3 realms anything didnt work well... cant figure it out since couple of hours i beg you for a small help / hint

just wanted gm / admin can read everything and noone else...

Greetings Carnifexe
Boss and Coder of Ariadolis
User avatar
Carnifexe
DOL Experienced
 
Posts: 194
Joined: Sun Sep 25, 2005 11:54 pm
Location: Hamburg / Germany

Re: Broadcast / privlevel > 1 cant read

Postby elcotek » Sun Jul 13, 2014 1:51 am

you mean GM's cant read alle realms in the broat ?
Brotherland Final RvR/PvE/ToA http://brotherland.phpbb8.de/
User avatar
elcotek
Server Representative
 
Posts: 179
Joined: Mon May 12, 2008 9:28 pm
Website: http://brotherland-2.de
Location: Germany

Re: Broadcast / privlevel > 1 cant read

Postby Carnifexe » Sun Jul 13, 2014 10:02 am

Yes schnitte this is what i mean i tryd this in all ways but i think in the wrong direction hehe
Boss and Coder of Ariadolis
User avatar
Carnifexe
DOL Experienced
 
Posts: 194
Joined: Sun Sep 25, 2005 11:54 pm
Location: Hamburg / Germany

Re: Broadcast / privlevel > 1 cant read

Postby geshi » Sun Jul 13, 2014 12:38 pm

just change
Code: Select all
if (GameServer.ServerRules.IsAllowedToUnderstand(p, player) || ((eBroadcastType)ServerProperties.Properties.BROADCAST_TYPE == eBroadcastType.Server))
to
Code: Select all
if (GameServer.ServerRules.IsAllowedToUnderstand(p, player) || ((eBroadcastType)ServerProperties.Properties.BROADCAST_TYPE == eBroadcastType.Server) || player.Client.Account.PrivLevel >= (uint)ePrivLevel.GM || p.Client.Account.PrivLevel >= (uint)ePrivLevel.GM)
then all GMs will be able to read what everyone's is saying and everyone will be able to read what the GMs are saying in broadcast.

You shouldn't really be modifying stuff in GameServer but I guess it's too late now
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: Broadcast / privlevel > 1 cant read

Postby Carnifexe » Sun Jul 13, 2014 1:10 pm

just change
Code: Select all
if (GameServer.ServerRules.IsAllowedToUnderstand(p, player) || ((eBroadcastType)ServerProperties.Properties.BROADCAST_TYPE == eBroadcastType.Server))
to
Code: Select all
if (GameServer.ServerRules.IsAllowedToUnderstand(p, player) || ((eBroadcastType)ServerProperties.Properties.BROADCAST_TYPE == eBroadcastType.Server) || player.Client.Account.PrivLevel >= (uint)ePrivLevel.GM || p.Client.Account.PrivLevel >= (uint)ePrivLevel.GM)
then all GMs will be able to read what everyone's is saying and everyone will be able to read what the GMs are saying in broadcast.

You shouldn't really be modifying stuff in GameServer but I guess it's too late now

This is what i tryd before but
Code: Select all
case eBroadcastType.Realm: { foreach (GameClient thisClient in WorldMgr.GetClientsOfRealm(player.Realm)) { list.Add(thisClient.Player); } break; }
we use eBroadcastType.Realm also Realm = 5,
and it wont work :(
Class Reference is icommandhandler and abstractcommandhandler but i think i comes from the serverrules

any idea left ?
Boss and Coder of Ariadolis
User avatar
Carnifexe
DOL Experienced
 
Posts: 194
Joined: Sun Sep 25, 2005 11:54 pm
Location: Hamburg / Germany

Re: Broadcast / privlevel > 1 cant read

Postby elcotek » Sun Jul 13, 2014 2:28 pm

ok my time is short, i have post the better broatcast here on the Forum:
http://www.dolserver.net/viewtopic.php?f=47&t=22067

have fun with the fix :wink:
Brotherland Final RvR/PvE/ToA http://brotherland.phpbb8.de/
User avatar
elcotek
Server Representative
 
Posts: 179
Joined: Mon May 12, 2008 9:28 pm
Website: http://brotherland-2.de
Location: Germany

Re: Broadcast / privlevel > 1 cant read

Postby elcotek » Tue Jul 15, 2014 10:57 pm

if you use the script on your server, you have to say the problem is soved, so the staff can set it as "solved"

is it now solved or not ?
Brotherland Final RvR/PvE/ToA http://brotherland.phpbb8.de/
User avatar
elcotek
Server Representative
 
Posts: 179
Joined: Mon May 12, 2008 9:28 pm
Website: http://brotherland-2.de
Location: Germany

Re: [solved] Broadcast / privlevel > 1 cant read

Postby Graveen » Wed Jul 16, 2014 10:52 am

done
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12661
Joined: Fri Oct 19, 2007 9:22 pm
Location: France


Return to “%s” Support

Who is online

Users browsing this forum: No registered users and 1 guest