Jump to content
  • 0

[question] announce code


Question

Posted

	private void changeMode(int mode)
{
	if(_nightCreatures.size() == 0 && _dayCreatures.size() == 0)
		return;

	switch(mode)
	{
		case 0:
		{
			Announcements.getInstance().announceToAll("Day begin.");
		}
			spawnDayCreatures();
			specialNightBoss(0);
			ShadowSenseMsg(0);
			break;
		case 1:
		{
			Announcements.getInstance().announceToAll("Night begin.");
		}
			spawnNightCreatures();
			specialNightBoss(1);
			ShadowSenseMsg(1);
			break;
		default:
			_log.warning("DayNightSpawnManager: Wrong mode sent");
			break;
	}
}

 

this code its ok? i add announce when change day to night  will work normal?

 

i wanna when is day announce day begin and when is night same..

7 answers to this question

Recommended Posts

  • 0
Posted

Should but... remove {}...

 

-{
      Announcements.getInstance().announceToAll("Day begin.");
-}
-{
Announcements.getInstance().announceToAll("Night begin.");
-}

  • 0
Posted

size() == 0 > isEmpty().

 

About the message, if you got working day+night spawns / Von Hellman / shadow sense messages, no reason your announcement is broken.

 

Until the method to announce is itself broken.

  • 0
Posted

size() == 0 > isEmpty().

 

About the message, if you got working day+night spawns / Von Hellman / shadow sense messages, no reason your announcement is broken.

 

Until the method to announce is itself broken.

 

i have remove all official spawns, i have some items that working day/night and i need that announce .. so i cant fix  that u mean?

  • 0
Posted

emena ti m leei kati sto annuce.... otan grafo p.x numera  5 i 4 m leei kati gia 3000 characters////.........fakin:D pws tha to fix?

English section here.

 

However, this is because you are trying to say small numbers of characters. If you set 2 characters only (eg. SS) says you that message.

However you can do that:

//announce 4(space)(space)(space)(space)

 

I thinks it is going to work

Guest
This topic is now closed to further replies.


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock